mbedtls_psa_mac_sign_finish() function
Finish the calculation of the MAC of a message using Mbed TLS. The PSA core calls mbedtls_psa_mac_sign_setup() before calling this function. This function calculates the MAC of the message formed by concatenating the inputs passed to preceding calls to mbedtls_psa_mac_update(). Whether this function returns successfully or not, the PSA core subsequently aborts the operation by calling mbedtls_psa_mac_abort().
Arguments
operation
Active MAC operation.
mac
Buffer where the MAC value is to be written.
mac_size
Output size requested for the MAC algorithm. The PSA core guarantees this is a valid MAC length for the algorithm and key combination passed to mbedtls_psa_mac_sign_setup(). It also guarantees the \p mac buffer is large enough to contain the requested output size.
mac_length
On success, the number of bytes output to buffer \p mac, which will be equal to the requested length \p mac_size.
Return value
#PSA_SUCCESS Success. #PSA_ERROR_BAD_STATE The operation state is not valid (it must be an active mac sign operation). #PSA_ERROR_BUFFER_TOO_SMALL The size of the \p mac buffer is too small. A sufficient buffer size can be determined by calling PSA_MAC_LENGTH(). #PSA_ERROR_INSUFFICIENT_MEMORY \emptydescription #PSA_ERROR_CORRUPTION_DETECTED \emptydescription
Notes
The signature of this function is that of a PSA driver mac_sign_finish entry point. This function behaves as a mac_sign_finish entry point as defined in the PSA driver interface specification for transparent drivers.
mbedtls_psa_mac_sign_finish() is called by 1 function and calls 1 function:
![]()
mbedtls_psa_mac_sign_finish()
mbedtls_psa_mac_sign_finish() reads 1 variable:
![]()
mbedtls_psa_mac_sign_finish()