#include <subsys/nrf_security/src/drivers/cracen/cracenpsa/include/cracen_psa_mac.h>
Compute a MAC in a single operation.
- Parameters
-
| [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. |
- Return values
-
| 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. |