Function esp_idf_hal::sys::mbedtls_ccm_setkey
source ยท pub unsafe extern "C" fn mbedtls_ccm_setkey(
ctx: *mut mbedtls_ccm_context,
cipher: u32,
key: *const u8,
keybits: u32,
) -> i32
Expand description
\brief This function initializes the CCM context set in the \p ctx parameter and sets the encryption key.
\param ctx The CCM context to initialize. This must be an initialized context. \param cipher The 128-bit block cipher to use. \param key The encryption key. This must not be \c NULL. \param keybits The key size in bits. This must be acceptable by the cipher.
\return \c 0 on success. \return A CCM or cipher-specific error code on failure.