23 #ifndef LW_INTERNAL_SHA256_H
24 #define LW_INTERNAL_SHA256_H
49 #define SHA256_HASH_SIZE 32
80 (
unsigned char *out,
const unsigned char *in,
size_t inlen);
119 const unsigned char *key,
size_t keylen,
120 const unsigned char *in,
size_t inlen);
unsigned posn
Definition: internal-sha256.h:59
Meta-information about a hash algorithm that is related to an AEAD.
Definition: aead-metadata.h:225
void internal_sha256_hmac_init(sha256_state_t *state, const unsigned char *key, size_t keylen)
Initializes an incremental HMAC state using SHA256.
void internal_sha256_hash_finalize(sha256_state_t *state, unsigned char *out)
Returns the final hash value from a SHA256 hashing operation.
Definition: internal-sha256.c:238
State for SHA256 incremental mode.
Definition: internal-sha256.h:54
void internal_sha256_hmac_update(sha256_state_t *state, const unsigned char *in, size_t inlen)
Updates an incremental SHA256-HMAC state with more input data.
void internal_sha256_hash_update(sha256_state_t *state, const unsigned char *in, size_t inlen)
Updates a SHA256 state with more input data.
Definition: internal-sha256.c:217
aead_hash_algorithm_t const internal_sha256_hash_algorithm
Meta-information block for the SHA256 hash algorithm.
Definition: internal-sha256.c:27
void internal_sha256_hmac(unsigned char *out, const unsigned char *key, size_t keylen, const unsigned char *in, size_t inlen)
Computes a HMAC value using SHA256.
void internal_sha256_hmac_finalize(sha256_state_t *state, const unsigned char *key, size_t keylen, unsigned char *out)
Finalizes an incremental SHA256-HMAC state.
uint64_t length
Definition: internal-sha256.h:58
int internal_sha256_hash(unsigned char *out, const unsigned char *in, size_t inlen)
Hashes a block of input data with SHA256 to generate a hash value.
Definition: internal-sha256.c:148
void internal_sha256_hash_init(sha256_state_t *state)
Initializes the state for a SHA256 hashing operation.
Definition: internal-sha256.c:202