17#ifndef PROTOCORE_HMAC_SHA512_H
18#define PROTOCORE_HMAC_SHA512_H
25#define PC_HMAC_SHA512_LEN 64
42void pc_hmac_sha512(
const uint8_t *key,
size_t key_len,
const uint8_t *data,
size_t len,
void pc_hmac_sha512_final(pc_hmac_sha512_ctx *ctx, uint8_t mac[PC_HMAC_SHA512_LEN])
Finish, writing the 64-byte MAC.
void pc_hmac_sha512_init(pc_hmac_sha512_ctx *ctx, const uint8_t *key, size_t key_len)
Begin an HMAC-SHA2-512 over key (keys > 128 bytes are pre-hashed per RFC 2104).
void pc_hmac_sha512(const uint8_t *key, size_t key_len, const uint8_t *data, size_t len, uint8_t mac[PC_HMAC_SHA512_LEN])
One-shot HMAC-SHA2-512 over a single buffer.
#define PC_HMAC_SHA512_LEN
HMAC-SHA2-512 output length in bytes.
void pc_hmac_sha512_update(pc_hmac_sha512_ctx *ctx, const uint8_t *data, size_t len)
Feed len message bytes.
SHA-512 (FIPS 180-4) - streaming context and one-shot API.
#define PC_SHA512_BLOCK_LEN
SHA-512 block size in bytes.
Streaming HMAC-SHA2-512 context (stores the opad key block + inner hash state).
pc_sha512_ctx inner
inner hash: H((key XOR ipad) || message)
Streaming SHA-512 context.