Functions
Functions
Peripheral Driver » APP DRIVER » HMAC
Collaboration diagram for Functions:

## Functions
uint16_t | app_hmac_init (app_hmac_params_t *p_params, app_hmac_evt_handler_t evt_handler)
| Initialize the APP HMAC DRIVER according to the specified parameters in the app_hmac_params_t and app_hmac_evt_handler_t. More...
uint16_t | app_hmac_deinit (void)
| De-initialize the APP HMAC DRIVER peripheral. More...
uint16_t | app_hmac_user_hash (uint32_t *p_user_hash)
| Update p_user_hash parameters. More...
uint16_t | app_hmac_sha256_sync (uint32_t *p_message, uint32_t number, uint32_t *p_digest, uint32_t timeout)
| xxx in blocking mode in SHA256/HMAC mode. More...
uint16_t | app_hmac_sha256_async (uint32_t *p_message, uint32_t number, uint32_t *p_digest)
| xxx in non-blocking mode in SHA256/HMAC mode. More...
hmac_handle_t * | app_hmac_get_handle (void)
| Return the hmac handle. More...

## Detailed Description

## Function Documentation

## ◆ app_hmac_deinit()

uint16_t app_hmac_deinit | ( | void |  | ) |

De-initialize the APP HMAC DRIVER peripheral.

Returns
  Result of De-initialization.

## ◆ app_hmac_get_handle()

hmac_handle_t* app_hmac_get_handle | ( | void |  | ) |

Return the hmac handle.

Returns
  Pointer to the hmac handle.

## ◆ app_hmac_init()

uint16_t app_hmac_init | ( | app_hmac_params_t * | p_params,
|  | app_hmac_evt_handler_t | evt_handler
| ) |  |

Initialize the APP HMAC DRIVER according to the specified parameters in the app_hmac_params_t and app_hmac_evt_handler_t.

Note
  If interrupt mode is set, you can use blocking mode. Conversely, if blocking mode is set, you can't use interrupt mode.

Parameters

  [in] | p_params | Pointer to app_hmac_params_t parameter which contains the configuration information for the specified HMAC module.
  [in] | evt_handler | HMAC user callback function.

Returns
  Result of initialization.

## ◆ app_hmac_sha256_async()

uint16_t app_hmac_sha256_async | ( | uint32_t * | p_message,
|  | uint32_t | number,
|  | uint32_t * | p_digest
| ) |  |

xxx in non-blocking mode in SHA256/HMAC mode.

Parameters

  [in] | p_message | Pointer to message buffer
  [in] | number | Amount of data
  [out] | p_digest | Pointer to digest buffer

Returns
  Result of initialization.

## ◆ app_hmac_sha256_sync()

uint16_t app_hmac_sha256_sync | ( | uint32_t * | p_message,
|  | uint32_t | number,
|  | uint32_t * | p_digest,
|  | uint32_t | timeout
| ) |  |

xxx in blocking mode in SHA256/HMAC mode.

Parameters

  [in] | p_message | Pointer to message buffer
  [in] | number | Amount of data
  [out] | p_digest | Pointer to digest buffer
  [in] | timeout | Timeout duration

Returns
  Result of initialization.

## ◆ app_hmac_user_hash()

uint16_t app_hmac_user_hash | ( | uint32_t * | p_user_hash | ) |

Update p_user_hash parameters.

Parameters

  [in] | p_user_hash | Pointer to p_user_hash.

Returns
  Result of initialization.