Ensure that nothing explodes when calling crypto_generichash_blake2b_init_salt_personal with salt/personal == NULL
This commit is contained in:
parent
51d9b223aa
commit
fbfbbdd349
@ -144,5 +144,10 @@ int main(void)
|
|||||||
assert(crypto_generichash_blake2b_salt_personal(out, sizeof out, in, MAXLEN,
|
assert(crypto_generichash_blake2b_salt_personal(out, sizeof out, in, MAXLEN,
|
||||||
k, crypto_generichash_KEYBYTES_MAX + 1U,
|
k, crypto_generichash_KEYBYTES_MAX + 1U,
|
||||||
salt, personal) == -1);
|
salt, personal) == -1);
|
||||||
|
assert(crypto_generichash_blake2b_init_salt_personal(&st, k, sizeof k, crypto_generichash_BYTES,
|
||||||
|
NULL, personal) == 0);
|
||||||
|
assert(crypto_generichash_blake2b_init_salt_personal(&st, k, sizeof k, crypto_generichash_BYTES,
|
||||||
|
personal, NULL) == 0);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user