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:
parent
666b833b98
commit
6677c6cab3
12 changed files with 44 additions and 104 deletions
10
auth_hmac.c
10
auth_hmac.c
|
@ -114,12 +114,6 @@ hmac_auth(uint8_t *out, size_t *outlen, void *initparams, const uint8_t *in,
|
|||
hmac_final(&ctx, out, outlen);
|
||||
}
|
||||
|
||||
static void *
|
||||
hmac_ctx_new(void)
|
||||
{
|
||||
return malloc(sizeof(struct hmac_ctx));
|
||||
}
|
||||
|
||||
|
||||
static struct lc_auth_impl hmac_impl = {
|
||||
.init = &hmac_init,
|
||||
|
@ -127,9 +121,7 @@ static struct lc_auth_impl hmac_impl = {
|
|||
.final = &hmac_final,
|
||||
.auth = &hmac_auth,
|
||||
|
||||
.ctx_new = &hmac_ctx_new,
|
||||
.ctx_free = NULL,
|
||||
|
||||
.argsz = sizeof(struct hmac_ctx),
|
||||
.blocklen = 0,
|
||||
.taglen = 0,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue