Function esp_idf_svc::hal::sys::mbedtls_md_hmac_starts
source ยท pub unsafe extern "C" fn mbedtls_md_hmac_starts(
ctx: *mut mbedtls_md_context_t,
key: *const u8,
keylen: usize,
) -> i32
Expand description
\brief This function sets the HMAC key and prepares to authenticate a new message.
Call this function after mbedtls_md_setup(), to use
the MD context for an HMAC calculation, then call
mbedtls_md_hmac_update() to provide the input data, and
mbedtls_md_hmac_finish() to get the HMAC value.
\param ctx The message digest context containing an embedded HMAC context. \param key The HMAC secret key. \param keylen The length of the HMAC key in Bytes.
\return \c 0 on success. \return #MBEDTLS_ERR_MD_BAD_INPUT_DATA on parameter-verification failure.