Loading...
Searching...
No Matches
sha256fst.h
Go to the documentation of this file.
61 uint8_t buffer_counter; /**< Pending byte count, always below SHA256_BLOCK_SIZE between calls. */
119 * @param[in] data Readable input of at least length bytes; may be NULL only when length is zero.
129 * @param[in] data Readable input of at least length bytes; may be NULL only when length is zero.
void sha256_bytes(const void *data, size_t length, void *output)
Hash one memory region to its standard 32-byte binary digest.
Definition sha256fst.c:279
void sha256_append_byte(struct sha256 *context, uint8_t byte)
Append one byte to an unfinished message.
Definition sha256fst.c:181
bool sha256_file(const char *filename, char output[SHA256_HEX_SIZE])
Hash an immutable nonempty regular file with bounded streaming scratch.
Definition sha256fst.c:286
void sha256_hex(const void *data, size_t length, char *output)
Hash one memory region to a lowercase hexadecimal string.
Definition sha256fst.c:272
void sha256_finalize_hex(struct sha256 *context, char *output)
Finish a message and write its lowercase hexadecimal digest.
Definition sha256fst.c:249
void sha256_finalize(struct sha256 *context)
Finish a message, leaving its eight digest words in context->state.
Definition sha256fst.c:226
#define SHA256_BLOCK_SIZE
Number of input bytes in one SHA-256 compression block.
Definition sha256fst.h:45
void sha256_append(struct sha256 *context, const void *data, size_t length)
Append an arbitrarily aligned chunk; empty chunks are harmless.
Definition sha256fst.c:190
void sha256_init(struct sha256 *context)
Initialize or reset a context for a new message.
Definition sha256fst.c:168
#define SHA256_HEX_SIZE
Required hexadecimal output capacity, including the trailing NUL.
Definition sha256fst.h:47
void sha256_finalize_bytes(struct sha256 *context, void *output)
Finish a message and write its standard big-endian digest bytes.
Definition sha256fst.c:262