Initialize AES GCM set key

pull/2479/head
Tesfa Mael 2019-09-20 10:17:08 -07:00
parent 8636bac12f
commit 54cdab8005
1 changed files with 1 additions and 0 deletions

View File

@ -3601,6 +3601,7 @@ int wc_AesGcmSetKey(Aes* aes, const byte* key, word32 len)
if (!((len == 16) || (len == 24) || (len == 32)))
return BAD_FUNC_ARG;
XMEMSET(aes, 0, sizeof(Aes));
XMEMSET(iv, 0, AES_BLOCK_SIZE);
ret = wc_AesSetKey(aes, key, len, iv, AES_ENCRYPTION);