mirror of
https://github.com/libtom/libtomcrypt
synced 2026-08-25 20:26:07 -04:00
blake2bmac_init/blake2smac_init - allows NULL key when keylen is 0 (in line with the BLAKE2 spec)
This commit is contained in:
parent
c8ac4fc11c
commit
57826bd484
2 changed files with 2 additions and 2 deletions
|
|
@ -16,7 +16,7 @@
|
|||
int blake2bmac_init(blake2bmac_state *st, unsigned long outlen, const unsigned char *key, unsigned long keylen)
|
||||
{
|
||||
LTC_ARGCHK(st != NULL);
|
||||
LTC_ARGCHK(key != NULL);
|
||||
LTC_ARGCHK(key != NULL || keylen == 0);
|
||||
return blake2b_init(st, outlen, key, keylen);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
int blake2smac_init(blake2smac_state *st, unsigned long outlen, const unsigned char *key, unsigned long keylen)
|
||||
{
|
||||
LTC_ARGCHK(st != NULL);
|
||||
LTC_ARGCHK(key != NULL);
|
||||
LTC_ARGCHK(key != NULL || keylen == 0);
|
||||
return blake2s_init(st, outlen, key, keylen);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue