16#ifndef DETERMINISTICESPASYNCWEBSERVER_SSH_HMAC_SHA512_H
17#define DETERMINISTICESPASYNCWEBSERVER_SSH_HMAC_SHA512_H
24#define SSH_HMAC_SHA512_LEN 64
41void ssh_hmac_sha512(
const uint8_t *key,
size_t key_len,
const uint8_t *data,
size_t len,
void ssh_hmac_sha512_final(SshHmacSha512Ctx *ctx, uint8_t mac[SSH_HMAC_SHA512_LEN])
Finish, writing the 64-byte MAC.
void ssh_hmac_sha512(const uint8_t *key, size_t key_len, const uint8_t *data, size_t len, uint8_t mac[SSH_HMAC_SHA512_LEN])
One-shot HMAC-SHA2-512 over a single buffer.
#define SSH_HMAC_SHA512_LEN
HMAC-SHA2-512 output length in bytes.
void ssh_hmac_sha512_init(SshHmacSha512Ctx *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 ssh_hmac_sha512_update(SshHmacSha512Ctx *ctx, const uint8_t *data, size_t len)
Feed len message bytes.
SHA-512 (FIPS 180-4) - streaming context and one-shot API.
#define SSH_SHA512_BLOCK_LEN
SHA-512 block size in bytes.
Streaming HMAC-SHA2-512 context (stores the opad key block + inner hash state).
SshSha512Ctx inner
inner hash: H((key XOR ipad) || message)
Streaming SHA-512 context.