Fix for older STM32Cube HAL that does not support `hcryp->Init.HeaderWidthUnit`. ZD 19926.

pull/8795/head
David Garske 2025-05-21 16:42:52 -07:00
parent 9fdb40caa4
commit cc78e3f5d1
1 changed files with 1 additions and 1 deletions

View File

@ -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 :