4#ifndef PROTOCORE_HMAC_SHA256_H
5#define PROTOCORE_HMAC_SHA256_H
38#define PROTOCORE_HMAC_SHA256_LEN 32
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_sha256_final(uint8_t *work, uint8_t *out)
Finish, writing the 32 bytes out.
PROTOCORE_NS HmacSha256Ns HmacSha256 PROTOCORE_UNUSED
Module namespace.
proto_bool protocore_hmac_sha256_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.
proto_bool protocore_hmac_sha256_update(uint8_t *work, const uint8_t *data, size_t len)
Feed the running MAC a chunk.
proto_bool protocore_hmac_sha256_init(uint8_t *work, const uint8_t *key, size_t key_len)
Start a MAC under HmacSha256Ns::key_args.
#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