forked from wolfSSL/wolfssl
Merge pull request #8795 from dgarske/stm32_aes_gcm_oldcube
Fix for STM32 AES GCM and older STM32Cube HAL that does not support `HeaderWidthUnit`
This commit is contained in:
@ -479,7 +479,7 @@ int wc_Stm32_Aes_Init(Aes* aes, CRYP_HandleTypeDef* hcryp)
|
||||
hcryp->Init.pKey = (STM_CRYPT_TYPE*)aes->key;
|
||||
#ifdef STM32_HAL_V2
|
||||
hcryp->Init.DataWidthUnit = CRYP_DATAWIDTHUNIT_BYTE;
|
||||
#ifdef STM_CRYPT_HEADER_WIDTH
|
||||
#if defined(CRYP_HEADERWIDTHUNIT_BYTE) && defined(STM_CRYPT_HEADER_WIDTH)
|
||||
hcryp->Init.HeaderWidthUnit =
|
||||
(STM_CRYPT_HEADER_WIDTH == 4) ?
|
||||
CRYP_HEADERWIDTHUNIT_WORD :
|
||||
|
Reference in New Issue
Block a user