![]() |
nRF Connect SDK API 3.4.99
|
| psa_status_t cracen_mac_compute | ( | const psa_key_attributes_t * | attributes, |
| const uint8_t * | key_buffer, | ||
| size_t | key_buffer_size, | ||
| psa_algorithm_t | alg, | ||
| const uint8_t * | input, | ||
| size_t | input_length, | ||
| uint8_t * | mac, | ||
| size_t | mac_size, | ||
| size_t * | mac_length ) |
#include <cracen_psa_mac.h>
Compute a MAC in a single operation.
| [in] | attributes | Key attributes. |
| [in] | key_buffer | Key material buffer. |
| [in] | key_buffer_size | Size of the key buffer in bytes. |
| [in] | alg | MAC algorithm. |
| [in] | input | Input data to authenticate. |
| [in] | input_length | Length of the input data in bytes. |
| [out] | mac | Buffer to store the MAC. |
| [in] | mac_size | Size of the MAC buffer in bytes. |
| [out] | mac_length | Length of the generated MAC in bytes. |
| PSA_SUCCESS | The operation completed successfully. |
| PSA_ERROR_INVALID_HANDLE | The key handle is invalid. |
| PSA_ERROR_NOT_SUPPORTED | The algorithm is not supported. |
| PSA_ERROR_BUFFER_TOO_SMALL | The MAC buffer is too small. |