mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-04-18 22:35:50 -04:00
fw: Check blake2s_init return value
This commit is contained in:
parent
92a6b70118
commit
76ba5e8ede
@ -24,7 +24,8 @@ static void calculate_auth_digest(uint8_t *nonce, uint8_t *auth_digest)
|
||||
blake2s_ctx ctx = {0};
|
||||
|
||||
// Generate a 16 byte authentication digest
|
||||
blake2s_init(&ctx, 16, NULL, 0);
|
||||
int blake2err = blake2s_init(&ctx, 16, NULL, 0);
|
||||
assert(blake2err == 0);
|
||||
blake2s_update(&ctx, (const void *)cdi, 32);
|
||||
blake2s_update(&ctx, nonce, 16);
|
||||
blake2s_final(&ctx, auth_digest);
|
||||
|
Loading…
x
Reference in New Issue
Block a user