mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 11:44:38 +02:00
Initialize AES GCM set key
This commit is contained in:
@@ -3601,6 +3601,7 @@ int wc_AesGcmSetKey(Aes* aes, const byte* key, word32 len)
|
|||||||
if (!((len == 16) || (len == 24) || (len == 32)))
|
if (!((len == 16) || (len == 24) || (len == 32)))
|
||||||
return BAD_FUNC_ARG;
|
return BAD_FUNC_ARG;
|
||||||
|
|
||||||
|
XMEMSET(aes, 0, sizeof(Aes));
|
||||||
XMEMSET(iv, 0, AES_BLOCK_SIZE);
|
XMEMSET(iv, 0, AES_BLOCK_SIZE);
|
||||||
ret = wc_AesSetKey(aes, key, len, iv, AES_ENCRYPTION);
|
ret = wc_AesSetKey(aes, key, len, iv, AES_ENCRYPTION);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user