void qpms_sha256_update(qpms_sha256_t *ctx, const void *data, size_t len)
Feeds len bytes into the hash.
Definition sha256.c:72
void qpms_sha256_init(qpms_sha256_t *ctx)
Initialises the hash state.
Definition sha256.c:63
void qpms_sha256_final(qpms_sha256_t *ctx, uint8_t out[32])
Finishes the hash and writes the 32-byte digest to out.
Definition sha256.c:98
int qpms_sha256_file_hex(char hex[65], const char *path)
One-shot SHA-256 of a whole file.
Definition sha256.c:133
void qpms_sha256_hex(char hex[65], const void *data, size_t len)
One-shot SHA-256 of a buffer.
Definition sha256.c:119
Incremental SHA-256 state.
Definition sha256.h:18
size_t blocklen
Bytes currently buffered in block.
Definition sha256.h:22
uint64_t nbytes
Total number of bytes processed.
Definition sha256.h:20