Check return code of crypto_generichash_init()
This commit is contained in:
parent
31d842a432
commit
595e98a224
@ -15,8 +15,12 @@ int main(void)
|
|||||||
|
|
||||||
for (i = 0; i < MAXLEN; ++i) {
|
for (i = 0; i < MAXLEN; ++i) {
|
||||||
in[i] = i;
|
in[i] = i;
|
||||||
crypto_generichash_init(&st, k, 1 + i % crypto_generichash_KEYBYTES_MAX,
|
if (crypto_generichash_init(&st, k,
|
||||||
1 + i % crypto_generichash_BYTES_MAX);
|
1 + i % crypto_generichash_KEYBYTES_MAX,
|
||||||
|
1 + i % crypto_generichash_BYTES_MAX) != 0) {
|
||||||
|
printf("crypto_generichash_init()\n");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
crypto_generichash_update(&st, in, i);
|
crypto_generichash_update(&st, in, i);
|
||||||
crypto_generichash_update(&st, in, i);
|
crypto_generichash_update(&st, in, i);
|
||||||
crypto_generichash_update(&st, in, i);
|
crypto_generichash_update(&st, in, i);
|
||||||
|
Loading…
Reference in New Issue
Block a user