STM32F4xx_HAL_Driver  1.8.3
HASH Private Functions
+ Collaboration diagram for HASH Private Functions:

Functions

HAL_StatusTypeDef HASH_Start (HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t *pOutBuffer, uint32_t Timeout, uint32_t Algorithm)
 Initialize the HASH peripheral, next process pInBuffer then read the computed digest. More...
 
HAL_StatusTypeDef HASH_Accumulate (HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint32_t Algorithm)
 If not already done, initialize the HASH peripheral then processes pInBuffer. More...
 
HAL_StatusTypeDef HASH_Accumulate_IT (HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint32_t Algorithm)
 If not already done, initialize the HASH peripheral then processes pInBuffer in interruption mode. More...
 
HAL_StatusTypeDef HASH_Start_IT (HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t *pOutBuffer, uint32_t Algorithm)
 Initialize the HASH peripheral, next process pInBuffer then read the computed digest in interruption mode. More...
 
HAL_StatusTypeDef HASH_Start_DMA (HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint32_t Algorithm)
 Initialize the HASH peripheral then initiate a DMA transfer to feed the input buffer to the Peripheral. More...
 
HAL_StatusTypeDef HASH_Finish (HASH_HandleTypeDef *hhash, uint8_t *pOutBuffer, uint32_t Timeout)
 Return the computed digest. More...
 
HAL_StatusTypeDef HMAC_Start (HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t *pOutBuffer, uint32_t Timeout, uint32_t Algorithm)
 Initialize the HASH peripheral in HMAC mode, next process pInBuffer then read the computed digest. More...
 
HAL_StatusTypeDef HMAC_Start_IT (HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t *pOutBuffer, uint32_t Algorithm)
 Initialize the HASH peripheral in HMAC mode, next process pInBuffer then read the computed digest in interruption mode. More...
 
HAL_StatusTypeDef HMAC_Start_DMA (HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint32_t Algorithm)
 Initialize the HASH peripheral in HMAC mode then initiate the required DMA transfers to feed the key and the input buffer to the Peripheral. More...
 

Detailed Description

Function Documentation

◆ HASH_Accumulate()

HAL_StatusTypeDef HASH_Accumulate ( HASH_HandleTypeDef hhash,
uint8_t *  pInBuffer,
uint32_t  Size,
uint32_t  Algorithm 
)

If not already done, initialize the HASH peripheral then processes pInBuffer.

Note
Field hhash->Phase of HASH handle is tested to check whether or not the Peripheral has already been initialized.
The input buffer size (in bytes) must be a multiple of 4 otherwise, the HASH digest computation is corrupted.
Parameters
hhashHASH handle.
pInBufferpointer to the input buffer (buffer to be hashed).
Sizelength of the input buffer in bytes, must be a multiple of 4.
AlgorithmHASH algorithm.
Return values
HALstatus

Definition at line 2644 of file stm32f4xx_hal_hash.c.

◆ HASH_Accumulate_IT()

HAL_StatusTypeDef HASH_Accumulate_IT ( HASH_HandleTypeDef hhash,
uint8_t *  pInBuffer,
uint32_t  Size,
uint32_t  Algorithm 
)

If not already done, initialize the HASH peripheral then processes pInBuffer in interruption mode.

Note
Field hhash->Phase of HASH handle is tested to check whether or not the Peripheral has already been initialized.
The input buffer size (in bytes) must be a multiple of 4 otherwise, the HASH digest computation is corrupted.
Parameters
hhashHASH handle.
pInBufferpointer to the input buffer (buffer to be hashed).
Sizelength of the input buffer in bytes, must be a multiple of 4.
AlgorithmHASH algorithm.
Return values
HALstatus

Definition at line 2747 of file stm32f4xx_hal_hash.c.

◆ HASH_Finish()

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

Return the computed digest.

Note
The API waits for DCIS to be set then reads the computed digest.
Parameters
hhashHASH handle.
pOutBufferpointer to the computed digest.
TimeoutTimeout value.
Return values
HALstatus

Definition at line 3143 of file stm32f4xx_hal_hash.c.

◆ HASH_Start()

HAL_StatusTypeDef HASH_Start ( HASH_HandleTypeDef hhash,
uint8_t *  pInBuffer,
uint32_t  Size,
uint8_t *  pOutBuffer,
uint32_t  Timeout,
uint32_t  Algorithm 
)

Initialize the HASH peripheral, next process pInBuffer then read the computed digest.

Note
Digest is available in pOutBuffer.
Parameters
hhashHASH handle.
pInBufferpointer to the input buffer (buffer to be hashed).
Sizelength of the input buffer in bytes.
pOutBufferpointer to the computed digest.
TimeoutTimeout value.
AlgorithmHASH algorithm.
Return values
HALstatus

Definition at line 2507 of file stm32f4xx_hal_hash.c.

◆ HASH_Start_DMA()

HAL_StatusTypeDef HASH_Start_DMA ( HASH_HandleTypeDef hhash,
uint8_t *  pInBuffer,
uint32_t  Size,
uint32_t  Algorithm 
)

Initialize the HASH peripheral then initiate a DMA transfer to feed the input buffer to the Peripheral.

Note
If MDMAT bit is set before calling this function (multi-buffer HASH processing case), the input buffer size (in bytes) must be a multiple of 4 otherwise, the HASH digest computation is corrupted. For the processing of the last buffer of the thread, MDMAT bit must be reset and the buffer length (in bytes) doesn't have to be a multiple of 4.
Parameters
hhashHASH handle.
pInBufferpointer to the input buffer (buffer to be hashed).
Sizelength of the input buffer in bytes.
AlgorithmHASH algorithm.
Return values
HALstatus

Definition at line 3027 of file stm32f4xx_hal_hash.c.

◆ HASH_Start_IT()

HAL_StatusTypeDef HASH_Start_IT ( HASH_HandleTypeDef hhash,
uint8_t *  pInBuffer,
uint32_t  Size,
uint8_t *  pOutBuffer,
uint32_t  Algorithm 
)

Initialize the HASH peripheral, next process pInBuffer then read the computed digest in interruption mode.

Note
Digest is available in pOutBuffer.
Parameters
hhashHASH handle.
pInBufferpointer to the input buffer (buffer to be hashed).
Sizelength of the input buffer in bytes.
pOutBufferpointer to the computed digest.
AlgorithmHASH algorithm.
Return values
HALstatus

Definition at line 2869 of file stm32f4xx_hal_hash.c.

◆ HMAC_Start()

HAL_StatusTypeDef HMAC_Start ( HASH_HandleTypeDef hhash,
uint8_t *  pInBuffer,
uint32_t  Size,
uint8_t *  pOutBuffer,
uint32_t  Timeout,
uint32_t  Algorithm 
)

Initialize the HASH peripheral in HMAC mode, next process pInBuffer then read the computed digest.

Note
Digest is available in pOutBuffer.
Same key is used for the inner and the outer hash functions; pointer to key and key size are respectively stored in hhash->Init.pKey and hhash->Init.KeySize.
Parameters
hhashHASH handle.
pInBufferpointer to the input buffer (buffer to be hashed).
Sizelength of the input buffer in bytes.
pOutBufferpointer to the computed digest.
TimeoutTimeout value.
AlgorithmHASH algorithm.
Return values
HALstatus

Definition at line 3204 of file stm32f4xx_hal_hash.c.

◆ HMAC_Start_DMA()

HAL_StatusTypeDef HMAC_Start_DMA ( HASH_HandleTypeDef hhash,
uint8_t *  pInBuffer,
uint32_t  Size,
uint32_t  Algorithm 
)

Initialize the HASH peripheral in HMAC mode then initiate the required DMA transfers to feed the key and the input buffer to the Peripheral.

Note
Same key is used for the inner and the outer hash functions; pointer to key and key size are respectively stored in hhash->Init.pKey and hhash->Init.KeySize.
In case of multi-buffer HMAC processing, the input buffer size (in bytes) must be a multiple of 4 otherwise, the HASH digest computation is corrupted. Only the length of the last buffer of the thread doesn't have to be a multiple of 4.
Parameters
hhashHASH handle.
pInBufferpointer to the input buffer (buffer to be hashed).
Sizelength of the input buffer in bytes.
AlgorithmHASH algorithm.
Return values
HALstatus

Definition at line 3393 of file stm32f4xx_hal_hash.c.

◆ HMAC_Start_IT()

HAL_StatusTypeDef HMAC_Start_IT ( HASH_HandleTypeDef hhash,
uint8_t *  pInBuffer,
uint32_t  Size,
uint8_t *  pOutBuffer,
uint32_t  Algorithm 
)

Initialize the HASH peripheral in HMAC mode, next process pInBuffer then read the computed digest in interruption mode.

Note
Digest is available in pOutBuffer.
Same key is used for the inner and the outer hash functions; pointer to key and key size are respectively stored in hhash->Init.pKey and hhash->Init.KeySize.
Parameters
hhashHASH handle.
pInBufferpointer to the input buffer (buffer to be hashed).
Sizelength of the input buffer in bytes.
pOutBufferpointer to the computed digest.
AlgorithmHASH algorithm.
Return values
HALstatus

Definition at line 3282 of file stm32f4xx_hal_hash.c.