Fix for AEC CTR mode with STM32 and CubeMX.

This commit is contained in:
David Garske
2019-11-15 12:08:25 -08:00
parent 27d95d1dfd
commit a7e415d077

View File

@ -3313,6 +3313,8 @@ int wc_AesSetIV(Aes* aes, const byte* iv)
hcryp.Init.Algorithm = CRYP_AES_CTR;
ByteReverseWords(iv, aes->reg, AES_BLOCK_SIZE);
hcryp.Init.pInitVect = (STM_CRYPT_TYPE*)iv;
#else
hcryp.Init.pInitVect = (STM_CRYPT_TYPE*)aes->reg;
#endif
HAL_CRYP_Init(&hcryp);