Functions
IO operation functions
Peripheral Driver » HAL Driver » HMAC » Functions

HMAC Encrypt/Decrypt functions. More...

Collaboration diagram for IO operation functions:

## Functions
hal_status_t | hal_hmac_sha256_digest (hmac_handle_t *p_hmac, uint32_t *p_message, uint32_t number, uint32_t *p_digest, uint32_t timeout)
| xxx in blocking mode in HMAC/SHA mode. More...
hal_status_t | hal_hmac_sha256_digest_it (hmac_handle_t *p_hmac, uint32_t *p_message, uint32_t number, uint32_t *p_digest)
| xxx in non-blocking mode with interrupt in HMAC/SHA mode. More...
hal_status_t | hal_hmac_sha256_digest_dma (hmac_handle_t *p_hmac, uint32_t *p_message, uint32_t number, uint32_t *p_digest)
| xxx in non-blocking mode with DMA in HMAC/SHA mode. More...

## Detailed Description

HMAC Encrypt/Decrypt functions.

     ===============================================================================
                          ##### IO operation functions #####
     ===============================================================================
        This subsection provides a set of functions allowing to manage the HMAC encrypt or decrypt.

        (#) There are two mode of transfer:
           (++) Blocking mode: The communication is performed in polling mode.
               The HAL status of all data processing is returned by the same function
               after finishing transfer.
           (++) Non-Blocking mode: The communication is performed using Interrupts
               or DMA, These API's return the HAL status.
               The end of the data processing will be indicated through the
               dedicated HMAC IRQ when using Interrupt mode or the DMA IRQ when
               using DMA mode.
               The hal_hmac_done_callback() user callbacks will be executed respectively
               at the end of the encrypt or decrypt process
               The hal_hmac_error_callback() user callback will be executed when a error is detected

        (#) Blocking mode API's are :
            (++) hal_hmac_sha256_digest()

        (#) Non-Blocking mode API's with Interrupt are :
            (++) hal_hmac_sha256_digest_it()

        (#) Non-Blocking mode API's with DMA are :
            (++) hal_hmac_sha256_digest_dma()

        (#) A set of encrypt or decrypt Callbacks are provided in Non_Blocking mode:
            (++) hal_hmac_done_callback()
            (++) hal_hmac_error_callback()

## Function Documentation

## ◆ hal_hmac_sha256_digest()

hal_status_t hal_hmac_sha256_digest | ( | hmac_handle_t * | p_hmac,
|  | uint32_t * | p_message,
|  | uint32_t | number,
|  | uint32_t * | p_digest,
|  | uint32_t | timeout
| ) |  |

xxx in blocking mode in HMAC/SHA mode.

Parameters

  [in] | p_hmac | Pointer to a HMAC handle which contains the configuration information for the specified HMAC module.
  [in] | p_message | Pointer to message buffer
  [in] | number | Amount of data
  [out] | p_digest | Pointer to digest buffer
  [in] | timeout | Timeout duration

Return values

  HAL_OK | Operation is OK.
  HAL_ERROR | Parameter error or operation not supported.
  HAL_BUSY | Driver is busy.
  HAL_TIMEOUT | Timeout occurred.

## ◆ hal_hmac_sha256_digest_dma()

hal_status_t hal_hmac_sha256_digest_dma | ( | hmac_handle_t * | p_hmac,
|  | uint32_t * | p_message,
|  | uint32_t | number,
|  | uint32_t * | p_digest
| ) |  |

xxx in non-blocking mode with DMA in HMAC/SHA mode.

Parameters

  [in] | p_hmac | Pointer to a HMAC handle which contains the configuration information for the specified HMAC module.
  [in] | p_message | Pointer to message buffer
  [in] | number | Amount of data
  [out] | p_digest | Pointer to digest buffer

Return values

  HAL_OK | Operation is OK.
  HAL_ERROR | Parameter error or operation not supported.
  HAL_BUSY | Driver is busy.
  HAL_TIMEOUT | Timeout occurred.

## ◆ hal_hmac_sha256_digest_it()

hal_status_t hal_hmac_sha256_digest_it | ( | hmac_handle_t * | p_hmac,
|  | uint32_t * | p_message,
|  | uint32_t | number,
|  | uint32_t * | p_digest
| ) |  |

xxx in non-blocking mode with interrupt in HMAC/SHA mode.

Parameters

  [in] | p_hmac | Pointer to a HMAC handle which contains the configuration information for the specified HMAC module.
  [in] | p_message | Pointer to message buffer
  [in] | number | Amount of data
  [out] | p_digest | Pointer to digest buffer

Return values

  HAL_OK | Operation is OK.
  HAL_ERROR | Parameter error or operation not supported.
  HAL_BUSY | Driver is busy.
  HAL_TIMEOUT | Timeout occurred.