STM32F439xx HAL User Manual
|
processing functions using DMA mode. More...
Functions | |
HAL_StatusTypeDef | HAL_HASH_MD5_Start_DMA (HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size) |
Initializes the HASH peripheral in MD5 mode then enables DMA to control data transfer. | |
HAL_StatusTypeDef | HAL_HASH_MD5_Finish (HASH_HandleTypeDef *hhash, uint8_t *pOutBuffer, uint32_t Timeout) |
Returns the computed digest in MD5 mode. | |
HAL_StatusTypeDef | HAL_HASH_SHA1_Start_DMA (HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size) |
Initializes the HASH peripheral in SHA1 mode then enables DMA to control data transfer. | |
HAL_StatusTypeDef | HAL_HASH_SHA1_Finish (HASH_HandleTypeDef *hhash, uint8_t *pOutBuffer, uint32_t Timeout) |
Returns the computed digest in SHA1 mode. | |
HAL_StatusTypeDef | HAL_HASH_SHA1_Start_IT (HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t *pOutBuffer) |
Initializes the HASH peripheral in SHA1 mode then processes pInBuffer. | |
HAL_StatusTypeDef | HAL_HASH_MD5_Start_IT (HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t *pOutBuffer) |
Initializes the HASH peripheral in MD5 mode then processes pInBuffer. |
processing functions using DMA mode.
=============================================================================== ##### HASH processing using DMA mode functions ##### =============================================================================== [..] This section provides functions allowing to calculate in DMA mode the hash value using one of the following algorithms: (+) MD5 (+) SHA1
HAL_StatusTypeDef HAL_HASH_MD5_Finish | ( | HASH_HandleTypeDef * | hhash, |
uint8_t * | pOutBuffer, | ||
uint32_t | Timeout | ||
) |
Returns the computed digest in MD5 mode.
hhash | pointer to a HASH_HandleTypeDef structure that contains the configuration information for HASH module |
pOutBuffer | Pointer to the computed digest. Its size must be 16 bytes. |
Timeout | Timeout value |
HAL | status |
Definition at line 1207 of file stm32f4xx_hal_hash.c.
References HAL_GetTick(), HAL_HASH_STATE_BUSY, HAL_HASH_STATE_READY, HAL_HASH_STATE_TIMEOUT, HASH_FLAG_DCIS, HASH_GetDigest(), and HASH_HandleTypeDef::State.
HAL_StatusTypeDef HAL_HASH_MD5_Start_DMA | ( | HASH_HandleTypeDef * | hhash, |
uint8_t * | pInBuffer, | ||
uint32_t | Size | ||
) |
Initializes the HASH peripheral in MD5 mode then enables DMA to control data transfer.
Use HAL_HASH_MD5_Finish() to get the digest.
hhash | pointer to a HASH_HandleTypeDef structure that contains the configuration information for HASH module |
pInBuffer | Pointer to the input buffer (buffer to be hashed). |
Size | Length of the input buffer in bytes. If the Size is not multiple of 64 bytes, the padding is managed by hardware. |
HAL | status |
Definition at line 1157 of file stm32f4xx_hal_hash.c.
References __HAL_HASH_SET_NBVALIDBITS, HAL_DMA_Start_IT(), HAL_HASH_PHASE_PROCESS, HAL_HASH_PHASE_READY, HAL_HASH_STATE_BUSY, HASH_ALGOSELECTION_MD5, HASH_DMAError(), HASH_DMAXferCplt(), HASH_HandleTypeDef::hdmain, HASH_HandleTypeDef::Phase, HASH_HandleTypeDef::State, __DMA_HandleTypeDef::XferCpltCallback, and __DMA_HandleTypeDef::XferErrorCallback.
HAL_StatusTypeDef HAL_HASH_MD5_Start_IT | ( | HASH_HandleTypeDef * | hhash, |
uint8_t * | pInBuffer, | ||
uint32_t | Size, | ||
uint8_t * | pOutBuffer | ||
) |
Initializes the HASH peripheral in MD5 mode then processes pInBuffer.
The digest is available in pOutBuffer.
hhash | pointer to a HASH_HandleTypeDef structure that contains the configuration information for HASH module |
pInBuffer | Pointer to the input buffer (buffer to be hashed). |
Size | Length of the input buffer in bytes. If the Size is not multiple of 64 bytes, the padding is managed by hardware. |
pOutBuffer | Pointer to the computed digest. Its size must be 16 bytes. |
HAL | status |
Definition at line 797 of file stm32f4xx_hal_hash.c.
References __HAL_HASH_GET_FLAG, __HAL_HASH_SET_NBVALIDBITS, __HAL_HASH_START_DIGEST, HAL_HASH_DgstCpltCallback(), HAL_HASH_InCpltCallback(), HAL_HASH_PHASE_PROCESS, HAL_HASH_PHASE_READY, HAL_HASH_STATE_BUSY, HAL_HASH_STATE_READY, HASH_ALGOSELECTION_MD5, HASH_FLAG_DCIS, HASH_FLAG_DINIS, HASH_IT_DCI, HASH_IT_DINI, HASH_HandleTypeDef::HashInCount, HASH_HandleTypeDef::HashITCounter, HASH_HandleTypeDef::Phase, HASH_HandleTypeDef::pHashInBuffPtr, HASH_HandleTypeDef::pHashOutBuffPtr, and HASH_HandleTypeDef::State.
Referenced by HAL_HASH_IRQHandler().
HAL_StatusTypeDef HAL_HASH_SHA1_Finish | ( | HASH_HandleTypeDef * | hhash, |
uint8_t * | pOutBuffer, | ||
uint32_t | Timeout | ||
) |
Returns the computed digest in SHA1 mode.
hhash | pointer to a HASH_HandleTypeDef structure that contains the configuration information for HASH module |
pOutBuffer | Pointer to the computed digest. Its size must be 20 bytes. |
Timeout | Timeout value |
HAL | status |
Definition at line 1312 of file stm32f4xx_hal_hash.c.
References HAL_GetTick(), HAL_HASH_STATE_BUSY, HAL_HASH_STATE_READY, HAL_HASH_STATE_TIMEOUT, HASH_FLAG_DCIS, HASH_GetDigest(), and HASH_HandleTypeDef::State.
HAL_StatusTypeDef HAL_HASH_SHA1_Start_DMA | ( | HASH_HandleTypeDef * | hhash, |
uint8_t * | pInBuffer, | ||
uint32_t | Size | ||
) |
Initializes the HASH peripheral in SHA1 mode then enables DMA to control data transfer.
Use HAL_HASH_SHA1_Finish() to get the digest.
hhash | pointer to a HASH_HandleTypeDef structure that contains the configuration information for HASH module |
pInBuffer | Pointer to the input buffer (buffer to be hashed). |
Size | Length of the input buffer in bytes. If the Size is not multiple of 64 bytes, the padding is managed by hardware. |
HAL | status |
Definition at line 1261 of file stm32f4xx_hal_hash.c.
References __HAL_HASH_SET_NBVALIDBITS, HAL_DMA_Start_IT(), HAL_HASH_PHASE_PROCESS, HAL_HASH_PHASE_READY, HAL_HASH_STATE_BUSY, HASH_ALGOSELECTION_SHA1, HASH_DMAError(), HASH_DMAXferCplt(), HASH_HandleTypeDef::hdmain, HASH_HandleTypeDef::Phase, HASH_HandleTypeDef::State, __DMA_HandleTypeDef::XferCpltCallback, and __DMA_HandleTypeDef::XferErrorCallback.
HAL_StatusTypeDef HAL_HASH_SHA1_Start_IT | ( | HASH_HandleTypeDef * | hhash, |
uint8_t * | pInBuffer, | ||
uint32_t | Size, | ||
uint8_t * | pOutBuffer | ||
) |
Initializes the HASH peripheral in SHA1 mode then processes pInBuffer.
The digest is available in pOutBuffer.
hhash | pointer to a HASH_HandleTypeDef structure that contains the configuration information for HASH module |
pInBuffer | Pointer to the input buffer (buffer to be hashed). |
Size | Length of the input buffer in bytes. If the Size is not multiple of 64 bytes, the padding is managed by hardware. |
pOutBuffer | Pointer to the computed digest. Its size must be 20 bytes. |
HAL | status |
Definition at line 956 of file stm32f4xx_hal_hash.c.
References __HAL_HASH_GET_FLAG, __HAL_HASH_SET_NBVALIDBITS, __HAL_HASH_START_DIGEST, HAL_HASH_DgstCpltCallback(), HAL_HASH_InCpltCallback(), HAL_HASH_PHASE_PROCESS, HAL_HASH_PHASE_READY, HAL_HASH_STATE_BUSY, HAL_HASH_STATE_READY, HASH_ALGOSELECTION_SHA1, HASH_FLAG_DCIS, HASH_FLAG_DINIS, HASH_IT_DCI, HASH_IT_DINI, HASH_HandleTypeDef::HashInCount, HASH_HandleTypeDef::HashITCounter, HASH_HandleTypeDef::Phase, HASH_HandleTypeDef::pHashInBuffPtr, HASH_HandleTypeDef::pHashOutBuffPtr, and HASH_HandleTypeDef::State.
Referenced by HAL_HASH_IRQHandler().