17#ifndef PROTOCORE_SHA512_H
18#define PROTOCORE_SHA512_H
24#define PC_SHA512_DIGEST_LEN 64
27#define PC_SHA512_BLOCK_LEN 128
31#include <mbedtls/sha512.h>
34 mbedtls_sha512_context
mbed;
void pc_sha512_update(pc_sha512_ctx *ctx, const uint8_t *data, size_t len)
Feed len bytes of data into the running hash.
void pc_sha512_init(pc_sha512_ctx *ctx)
Initialize a streaming SHA-512 context (ctx must not be NULL).
void pc_sha512(const uint8_t *data, size_t len, uint8_t digest[PC_SHA512_DIGEST_LEN])
One-shot SHA-512: hash len bytes of data into digest (64 bytes).
void pc_sha512_final(pc_sha512_ctx *ctx, uint8_t digest[PC_SHA512_DIGEST_LEN])
Finalize the hash and write the 64-byte digest. The context is undefined afterwards; call init() agai...
#define PC_SHA512_DIGEST_LEN
SHA-512 digest length in bytes.
Streaming SHA-512 context.
mbedtls_sha512_context mbed
mbedtls SHA-512 state (ESP32).