IO operation functions

HMAC Encrypt/Decrypt functions. More...

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 SHA/HMAC 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 SHA/HMAC 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 SHA/HMAC 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 SHA/HMAC mode.

Parameters
[in]p_hmacPointer to a HMAC handle which contains the configuration information for the specified HMAC module.
[in]p_messagePointer to message buffer
[in]numberAmount of data
[out]p_digestPointer to digest buffer
[in]timeoutTimeout duration
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout 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 SHA/HMAC mode.

Parameters
[in]p_hmacPointer to a HMAC handle which contains the configuration information for the specified HMAC module.
[in]p_messagePointer to massage buffer
[in]numberAmount of data
[out]p_digestPointer to digest buffer
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout 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 SHA/HMAC mode.

Parameters
[in]p_hmacPointer to a HMAC handle which contains the configuration information for the specified HMAC module.
[in]p_messagePointer to message buffer
[in]numberAmount of data
[out]p_digestPointer to digest buffer
Return values
HAL_OKOperation is OK.
HAL_ERRORParameter error or operation not supported.
HAL_BUSYDriver is busy.
HAL_TIMEOUTTimeout occurred.