![]() |
LINE Solver (C++)
Templated C++ port of the LINE queueing solver
|
Incremental SHA-256. More...
#include <line/util/sha256.h>
Public Member Functions | |
| Sha256 () | |
| void | reset () |
| void | update (const void *data, std::size_t n) |
| void | update (const std::string &s) |
| std::string | hex () |
| Finalizes and returns the digest as 64 lowercase hex characters. | |
Incremental SHA-256.
Feed it with update(), read the digest once with hex().
The object is SPENT by hex(): the padding is appended to the running state rather than to a copy, so a second call would digest the padding again. The two free functions below are the intended interface; this class is public only because a caller hashing something that is not a file or a string needs somewhere to put the loop.
|
inline |
Finalizes and returns the digest as 64 lowercase hex characters.
Definition at line 102 of file sha256.h.
References update().
Referenced by line::util::sha256_file_hex(), and line::util::sha256_hex().
|
inline |
|
inline |
|
inline |
Definition at line 82 of file sha256.h.
Referenced by hex(), line::util::sha256_file_hex(), and line::util::sha256_hex().