Test crypto_hmac_sha256_update() with empty chunks
This commit is contained in:
parent
2a2ed3df3a
commit
51a0b96f1d
@ -54,6 +54,7 @@ main(void)
|
|||||||
|
|
||||||
memset(a2, 0, sizeof a2);
|
memset(a2, 0, sizeof a2);
|
||||||
crypto_auth_hmacsha256_init(&st, key2, sizeof key2);
|
crypto_auth_hmacsha256_init(&st, key2, sizeof key2);
|
||||||
|
crypto_auth_hmacsha256_update(&st, NULL, 0U);
|
||||||
crypto_auth_hmacsha256_update(&st, c, 1U);
|
crypto_auth_hmacsha256_update(&st, c, 1U);
|
||||||
crypto_auth_hmacsha256_update(&st, c, sizeof c - 2U);
|
crypto_auth_hmacsha256_update(&st, c, sizeof c - 2U);
|
||||||
crypto_auth_hmacsha256_final(&st, a2);
|
crypto_auth_hmacsha256_final(&st, a2);
|
||||||
|
Loading…
Reference in New Issue
Block a user