nRF Connect SDK API 3.4.99
Loading...
Searching...
No Matches

◆ cracen_cmac_compute()

psa_status_t cracen_cmac_compute ( cracen_mac_operation_t * op,
const uint8_t * input,
size_t input_length )

#include <cracen_sw_mac_cmac.h>

Compute a CMAC in a single pass, without context switching.

Note
This function assumes the setup function is called first.
On success the full CMAC block is written to op->input_buffer. The caller copies out op->mac_size bytes, which is shorter than the block for a truncated MAC. The MAC is deliberately not written to a caller-supplied buffer, because its length is fixed by the algorithm rather than by the requested MAC size.
Returns
PSA_SUCCESS on success or a valid PSA status code.