esp_hmac_calculate() function
Calculate the HMAC of a given message. Calculate the HMAC \c hmac of a given message \c message with length \c message_len. SHA256 is used for the calculation.
Arguments
key_id
Determines which of the 6 key blocks in the efuses should be used for the HMAC calculation. The corresponding purpose field of the key block in the efuse must be set to the HMAC upstream purpose value.
message
the message for which to calculate the HMAC
message_len
message length return ESP_ERR_INVALID_STATE if unsuccessful
Return value
* ESP_OK, if the calculation was successful, * ESP_ERR_INVALID_ARG if message or hmac is a nullptr or if key_id out of range * ESP_FAIL, if the hmac calculation failed
Notes
Uses the HMAC peripheral in "upstream" mode.