25#ifndef DETERMINISTICESPASYNCWEBSERVER_SSH_HMAC_SHA256_H
26#define DETERMINISTICESPASYNCWEBSERVER_SSH_HMAC_SHA256_H
33#define SSH_HMAC_SHA256_LEN 32
48void ssh_hmac_sha256(
const uint8_t *key,
size_t key_len,
const uint8_t *data,
size_t len,
void ssh_hmac_sha256_final(SshHmacCtx *ctx, uint8_t mac[SSH_HMAC_SHA256_LEN])
Finalize and write the 32-byte MAC.
void ssh_hmac_sha256_init(SshHmacCtx *ctx, const uint8_t *key, size_t key_len)
Initialize a streaming HMAC-SHA2-256 context.
#define SSH_HMAC_SHA256_LEN
HMAC-SHA2-256 output length in bytes.
void ssh_hmac_sha256_update(SshHmacCtx *ctx, const uint8_t *data, size_t len)
Feed len bytes into the running HMAC.
void ssh_hmac_sha256(const uint8_t *key, size_t key_len, const uint8_t *data, size_t len, uint8_t mac[SSH_HMAC_SHA256_LEN])
Compute HMAC-SHA2-256 over a single contiguous buffer.
SHA-256 (FIPS 180-4) - streaming context and one-shot API.
Streaming HMAC-SHA2-256 context.
SshSha256Ctx inner
Inner hash context (key XOR ipad prepended).
uint8_t okey[64]
Outer key block (key XOR opad), stored for final step.
Streaming SHA-256 context.