13 u32 key[SHA1_BLOCK_SIZE /
sizeof(
u32)];
14 u32 mac[SHA1_HASH_SIZE /
sizeof(
u32)];
21 u32 key[SHA256_BLOCK_SIZE /
sizeof(
u32)];
22 u32 mac[SHA256_HASH_SIZE /
sizeof(
u32)];
26 #ifndef HMAC_SHA1_KEY_MAX
27 #define HMAC_SHA1_KEY_MAX (sizeof(((HmacSha1Context *)NULL)->key))
29 #ifndef HMAC_SHA256_KEY_MAX
30 #define HMAC_SHA256_KEY_MAX (sizeof(((HmacSha256Context *)NULL)->key))
void hmacSha1ContextGetMac(HmacSha1Context *ctx, void *dst)
Gets the context's output mac, finalizes the context.
void hmacSha1ContextUpdate(HmacSha1Context *ctx, const void *src, size_t size)
Updates HMAC-SHA1 context with data to hash.
void hmacSha1ContextCreate(HmacSha1Context *out, const void *key, size_t key_size)
Initialize a HMAC-SHA1 context.
void hmacSha256ContextGetMac(HmacSha256Context *ctx, void *dst)
Gets the context's output mac, finalizes the context.
void hmacSha256ContextUpdate(HmacSha256Context *ctx, const void *src, size_t size)
Updates HMAC-SHA256 context with data to hash.
void hmacSha256CalculateMac(void *dst, const void *key, size_t key_size, const void *src, size_t size)
Simple all-in-one HMAC-SHA256 calculator.
void hmacSha1CalculateMac(void *dst, const void *key, size_t key_size, const void *src, size_t size)
Simple all-in-one HMAC-SHA1 calculator.
void hmacSha256ContextCreate(HmacSha256Context *out, const void *key, size_t key_size)
Initialize a HMAC-SHA256 context.
Hardware accelerated SHA1 implementation.
Hardware accelerated SHA256 implementation.
Context for HMAC-SHA1 operations.
Definition: hmac.h:11
Context for HMAC-SHA256 operations.
Definition: hmac.h:19
Context for SHA1 operations.
Definition: sha1.h:18
Context for SHA256 operations.
Definition: sha256.h:19
uint32_t u32
32-bit unsigned integer.
Definition: types.h:21