4#ifndef PROTOCORE_SHA384_H
5#define PROTOCORE_SHA384_H
34#define PROTOCORE_SHA384_DIGEST_LEN 48
37#define PROTOCORE_SHA384_BLOCK_LEN 128
42 embed_bool (*
init)(uint8_t *);
43 embed_bool (*
update)(uint8_t *,
const uint8_t *, size_t);
44 embed_bool (*
final)(uint8_t *, uint8_t *);
45 embed_bool (*
hash)(uint8_t *,
const uint8_t *, size_t, uint8_t *);
#define PROTOCORE_UNUSED
Suppress the unused warning. Every module ends in a namespace most callers only partly use.
#define PROTOCORE_NS_LAYOUT(T,...)
Pin every dispatch slot of a table that is nothing but function pointers.
#define PROTOCORE_NS
Storage for a dispatch table. The const is load bearing.
embed_bool protocore_sha384_update(uint8_t *work, const uint8_t *data, size_t len)
Feed the running digest a chunk.
embed_bool protocore_sha384_init(uint8_t *work)
Start a digest.
embed_bool protocore_sha384_hash(uint8_t *work, const uint8_t *data, size_t len, uint8_t *out)
Init, update and final in one call, for a message already whole.
embed_bool protocore_sha384_final(uint8_t *work, uint8_t *out)
Pad, compress the last block, write the 48 bytes out.
Dispatch table. Addressed by offset, so the layout is asserted below.
embed_bool(* update)(uint8_t *, const uint8_t *, size_t)
embed_bool(* init)(uint8_t *)
embed_bool(* hash)(uint8_t *, const uint8_t *, size_t, uint8_t *)