STM32L4xx_HAL_Driver  1.14.0
HMAC processing functions in polling mode

HMAC processing functions using polling mode. More...

Functions

HAL_StatusTypeDef HAL_HMAC_SHA1_Start (HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t *pOutBuffer, uint32_t Timeout)
 Initialize the HASH peripheral in HMAC SHA1 mode, next process pInBuffer then read the computed digest. More...
 
HAL_StatusTypeDef HAL_HMAC_MD5_Start (HASH_HandleTypeDef *hhash, uint8_t *pInBuffer, uint32_t Size, uint8_t *pOutBuffer, uint32_t Timeout)
 Initialize the HASH peripheral in HMAC MD5 mode, next process pInBuffer then read the computed digest. More...
 

Detailed Description

HMAC processing functions using polling mode.

 ===============================================================================
                 ##### Polling mode HMAC processing functions #####
 ===============================================================================
    [..]  This section provides functions allowing to calculate in polling mode
          the HMAC value using one of the following algorithms:
      (+) MD5
         (++) HAL_HMAC_MD5_Start()
      (+) SHA1
         (++) HAL_HMAC_SHA1_Start()

Function Documentation

◆ HAL_HMAC_MD5_Start()

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

Initialize the HASH peripheral in HMAC MD5 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. Digest size is 16 bytes.
TimeoutTimeout value.
Return values
HALstatus

Definition at line 1087 of file stm32l4xx_hal_hash.c.

1088 {
1089  return HMAC_Start(hhash, pInBuffer, Size, pOutBuffer, Timeout, HASH_ALGOSELECTION_MD5);
1090 }
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...

◆ HAL_HMAC_SHA1_Start()

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

Initialize the HASH peripheral in HMAC SHA1 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. Digest size is 20 bytes.
TimeoutTimeout value.
Return values
HALstatus

Definition at line 1105 of file stm32l4xx_hal_hash.c.

1106 {
1107  return HMAC_Start(hhash, pInBuffer, Size, pOutBuffer, Timeout, HASH_ALGOSELECTION_SHA1);
1108 }
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...