allow NULL IVs for CBC mode, same as all zero IV

This commit is contained in:
toddouska
2013-07-08 11:52:00 -07:00
parent b66cb11cb8
commit f9bf003718
6 changed files with 37 additions and 22 deletions

View File

@@ -2865,6 +2865,8 @@ int AesSetIV(Aes* aes, const byte* iv)
if (iv)
XMEMCPY(aes->reg, iv, AES_BLOCK_SIZE);
else
XMEMSET(aes->reg, 0, AES_BLOCK_SIZE);
return 0;
}