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
|
@ -150,12 +150,6 @@ poly1305_auth(uint8_t *out, size_t *outlen, void *initparams,
|
|||
poly1305_final(&ctx, out, outlen);
|
||||
}
|
||||
|
||||
static void *
|
||||
poly1305_ctx_new(void)
|
||||
{
|
||||
return malloc(sizeof(struct poly1305_ctx));
|
||||
}
|
||||
|
||||
|
||||
static struct lc_auth_impl poly1305_impl = {
|
||||
.init = &poly1305_init,
|
||||
|
@ -163,9 +157,7 @@ static struct lc_auth_impl poly1305_impl = {
|
|||
.final = &poly1305_final,
|
||||
.auth = &poly1305_auth,
|
||||
|
||||
.ctx_new = &poly1305_ctx_new,
|
||||
.ctx_free = NULL,
|
||||
|
||||
.argsz = sizeof(struct poly1305_ctx),
|
||||
.blocklen = LC_POLY1305_BLOCKLEN,
|
||||
.taglen = LC_POLY1305_TAGLEN,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue