STM32F439xx HAL User Manual
Functions
HASHEx processing using DMA
HASHEx Exported Functions

Functions

HAL_StatusTypeDef HAL_HASHEx_SHA224_Start_DMA (HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size)
 Initializes the HASH peripheral in SHA224 mode then enables DMA to control data transfer.
HAL_StatusTypeDef HAL_HASHEx_SHA224_Finish (HASH_HandleTypeDef *hhash, uint8_t *pOutBuffer, uint32_t Timeout)
 Returns the computed digest in SHA224.
HAL_StatusTypeDef HAL_HASHEx_SHA256_Start_DMA (HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size)
 Initializes the HASH peripheral in SHA256 mode then enables DMA to control data transfer.
HAL_StatusTypeDef HAL_HASHEx_SHA256_Finish (HASH_HandleTypeDef *hhash, uint8_t *pOutBuffer, uint32_t Timeout)
 Returns the computed digest in SHA256.

Function Documentation

HAL_StatusTypeDef HAL_HASHEx_SHA224_Finish ( HASH_HandleTypeDef hhash,
uint8_t *  pOutBuffer,
uint32_t  Timeout 
)

Returns the computed digest in SHA224.

Parameters:
hhashpointer to a HASH_HandleTypeDef structure that contains the configuration information for HASH module
pOutBufferPointer to the computed digest. Its size must be 28 bytes.
TimeoutTimeout value
Return values:
HALstatus

Definition at line 1313 of file stm32f4xx_hal_hash_ex.c.

References HAL_GetTick(), HAL_HASH_STATE_BUSY, HAL_HASH_STATE_READY, HAL_HASH_STATE_TIMEOUT, HASH_FLAG_DCIS, HASHEx_GetDigest(), and HASH_HandleTypeDef::State.

HAL_StatusTypeDef HAL_HASHEx_SHA224_Start_DMA ( HASH_HandleTypeDef hhash,
uint8_t *  pInBuffer,
uint32_t  Size 
)

Initializes the HASH peripheral in SHA224 mode then enables DMA to control data transfer.

Use HAL_HASH_SHA224_Finish() to get the digest.

Parameters:
hhashpointer to a HASH_HandleTypeDef structure that contains the configuration information for HASH module
pInBufferPointer to the input buffer (buffer to be hashed).
SizeLength of the input buffer in bytes. If the Size is not multiple of 64 bytes, the padding is managed by hardware.
Return values:
HALstatus

Definition at line 1263 of file stm32f4xx_hal_hash_ex.c.

References __HAL_HASH_SET_NBVALIDBITS, HAL_DMA_Start_IT(), HAL_HASH_PHASE_PROCESS, HAL_HASH_PHASE_READY, HAL_HASH_STATE_BUSY, HASH_ALGOSELECTION_SHA224, HASHEx_DMAError(), HASHEx_DMAXferCplt(), HASH_HandleTypeDef::hdmain, HASH_HandleTypeDef::Phase, HASH_HandleTypeDef::State, __DMA_HandleTypeDef::XferCpltCallback, and __DMA_HandleTypeDef::XferErrorCallback.

HAL_StatusTypeDef HAL_HASHEx_SHA256_Finish ( HASH_HandleTypeDef hhash,
uint8_t *  pOutBuffer,
uint32_t  Timeout 
)

Returns the computed digest in SHA256.

Parameters:
hhashpointer to a HASH_HandleTypeDef structure that contains the configuration information for HASH module
pOutBufferPointer to the computed digest. Its size must be 32 bytes.
TimeoutTimeout value
Return values:
HALstatus

Definition at line 1417 of file stm32f4xx_hal_hash_ex.c.

References HAL_GetTick(), HAL_HASH_STATE_BUSY, HAL_HASH_STATE_READY, HAL_HASH_STATE_TIMEOUT, HASH_FLAG_DCIS, HASHEx_GetDigest(), and HASH_HandleTypeDef::State.

HAL_StatusTypeDef HAL_HASHEx_SHA256_Start_DMA ( HASH_HandleTypeDef hhash,
uint8_t *  pInBuffer,
uint32_t  Size 
)

Initializes the HASH peripheral in SHA256 mode then enables DMA to control data transfer.

Use HAL_HASH_SHA256_Finish() to get the digest.

Parameters:
hhashpointer to a HASH_HandleTypeDef structure that contains the configuration information for HASH module
pInBufferPointer to the input buffer (buffer to be hashed).
SizeLength of the input buffer in bytes. If the Size is not multiple of 64 bytes, the padding is managed by hardware.
Return values:
HALstatus

Definition at line 1367 of file stm32f4xx_hal_hash_ex.c.

References __HAL_HASH_SET_NBVALIDBITS, HAL_DMA_Start_IT(), HAL_HASH_PHASE_PROCESS, HAL_HASH_PHASE_READY, HAL_HASH_STATE_BUSY, HASH_ALGOSELECTION_SHA256, HASHEx_DMAError(), HASHEx_DMAXferCplt(), HASH_HandleTypeDef::hdmain, HASH_HandleTypeDef::Phase, HASH_HandleTypeDef::State, __DMA_HandleTypeDef::XferCpltCallback, and __DMA_HandleTypeDef::XferErrorCallback.