Remove ctx_new and ctx_free function pointers

Now that HMAC isn't special anymore, and with the help of init params,
this isn't needed anymore as we only allocate memory for the state.

This effectively reverts e9bcc64e62 .
This commit is contained in:
Lucas Gabriel Vuotto 2024-06-10 17:44:05 +00:00
parent 666b833b98
commit 6677c6cab3
12 changed files with 44 additions and 104 deletions

16
auth.h
View file

@ -19,16 +19,14 @@
struct lc_auth_impl {
int (*init)(void *, void *);
int (*update)(void *, const uint8_t *, size_t);
int (*final)(void *, uint8_t *, size_t *);
int (*auth)(uint8_t *, size_t *, void *, const uint8_t *, size_t);
int (*init)(void *, void *);
int (*update)(void *, const uint8_t *, size_t);
int (*final)(void *, uint8_t *, size_t *);
int (*auth)(uint8_t *, size_t *, void *, const uint8_t *, size_t);
void *(*ctx_new)(void);
void (*ctx_free)(void *);
size_t blocklen;
size_t taglen;
size_t argsz;
size_t blocklen;
size_t taglen;
};
struct lc_auth_ctx {