mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-22 13:02:38 +02:00
Clear finalized field upon hmac context creation
This commit is contained in:
parent
006ebc0633
commit
9c887a13b4
@ -12,6 +12,7 @@
|
|||||||
#define HMAC_CONTEXT_CREATE(cipher) \
|
#define HMAC_CONTEXT_CREATE(cipher) \
|
||||||
/* Clear key. */ \
|
/* Clear key. */ \
|
||||||
memset(out->key, 0, sizeof(out->key)); \
|
memset(out->key, 0, sizeof(out->key)); \
|
||||||
|
out->finalized = false; \
|
||||||
\
|
\
|
||||||
/* Either hash the key into the context, or copy it directly if possible. */ \
|
/* Either hash the key into the context, or copy it directly if possible. */ \
|
||||||
if (key_size <= sizeof(out->key)) { \
|
if (key_size <= sizeof(out->key)) { \
|
||||||
|
Loading…
Reference in New Issue
Block a user