4#ifndef PROTOCORE_HMAC_SHA512_H
5#define PROTOCORE_HMAC_SHA512_H
38#define PROTOCORE_HMAC_SHA512_LEN 64
44 proto_bool (*update)(uint8_t *,
const uint8_t *, size_t);
46 proto_bool (*mac)(uint8_t *,
const uint8_t *, size_t,
const uint8_t *, size_t, uint8_t *);
proto_bool protocore_hmac_sha512_final(uint8_t *work, uint8_t *out)
Finish, writing the 64 bytes out.
proto_bool protocore_hmac_sha512_init(uint8_t *work, const uint8_t *key, size_t key_len)
Start a MAC under HmacSha512Ns::key_args.
proto_bool protocore_hmac_sha512_mac(uint8_t *work, const uint8_t *key, size_t key_len, const uint8_t *data, size_t len, uint8_t *out)
Init, update and final in one call, for a message already whole.
PROTOCORE_NS HmacSha512Ns HmacSha512 PROTOCORE_UNUSED
Module namespace.
proto_bool protocore_hmac_sha512_update(uint8_t *work, const uint8_t *data, size_t len)
Feed the running MAC a chunk.
#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.
Dispatch table. Addressed by offset, so the layout is asserted below.
proto_bool(* init)(uint8_t *, const uint8_t *, size_t)
#define PROTOCORE_BEGIN_DECLS
Give a header's declarations C linkage, so their symbol names carry no parameter types.
_Bool proto_bool
The truth value.
#define PROTOCORE_END_DECLS