tc_hmac_final() function
HMAC final procedure Writes the HMAC tag into the tag buffer
Arguments
tag
IN/OUT -- buffer to receive computed HMAC tag
taglen
IN -- size of tag in bytes
ctx
IN/OUT -- the HMAC state for computing tag
Return value
returns TC_CRYPTO_SUCCESS (1) returns TC_CRYPTO_FAIL (0) if: tag == NULL or ctx == NULL or key == NULL or taglen != TC_SHA256_DIGEST_SIZE
Notes
ctx is erased before exiting. This should never be changed/removed. Assumes the tag bufer is at least sizeof(hmac_tag_size(state)) bytes state has been initialized by tc_hmac_init
tc_hmac_final() is called by 4 functions and calls 4 functions:
![]()
tc_hmac_final()
tc_hmac_final() reads 1 variable:
![]()
tc_hmac_final()