auth/hmac: complete overhaul

Now that there are dedicated struct for initial parameters, make the
HMAC params provide a lc_hash_ctx to be used internally. This makes HMAC
less special and allows it to work with any hash, instead of needing
dedicated inits and ctx_news. As an upside, now it's possible to have a
one-pass HMAC.
This commit is contained in:
Lucas Gabriel Vuotto 2024-06-10 17:29:29 +00:00
parent f6bddfcd70
commit 666b833b98
4 changed files with 72 additions and 171 deletions

View file

@ -21,7 +21,6 @@
struct hmac_ctx {
struct lc_hash_ctx *hctx;
size_t blocksz;
struct lc_hash_ctx *hash;
uint8_t key[HMAC_BLOCKLEN_MAX];
};