22#ifndef DETERMINISTICESPASYNCWEBSERVER_SSH_SHA256_H
23#define DETERMINISTICESPASYNCWEBSERVER_SSH_SHA256_H
29#define SSH_SHA256_DIGEST_LEN 32
32#define SSH_SHA256_BLOCK_LEN 64
42#include <mbedtls/sha256.h>
45 mbedtls_sha256_context
mbed;
void ssh_sha256(const uint8_t *data, size_t len, uint8_t digest[SSH_SHA256_DIGEST_LEN])
One-shot SHA-256: hash len bytes and write the digest.
void ssh_sha256_init(SshSha256Ctx *ctx)
Initialize a streaming SHA-256 context.
void ssh_sha256_update(SshSha256Ctx *ctx, const uint8_t *data, size_t len)
Feed len bytes of data into the running hash.
void ssh_sha256_final(SshSha256Ctx *ctx, uint8_t digest[SSH_SHA256_DIGEST_LEN])
Finalize the hash and write the 32-byte digest.
#define SSH_SHA256_DIGEST_LEN
SHA-256 digest length in bytes.
Streaming SHA-256 context.
mbedtls_sha256_context mbed
HW-accelerated SHA-256 state (ESP32 mbedtls).