Function esp_idf_sys::mbedtls_ccm_setkey
source ยท pub unsafe extern "C" fn mbedtls_ccm_setkey(
ctx: *mut mbedtls_ccm_context,
cipher: mbedtls_cipher_id_t,
key: *const c_uchar,
keybits: c_uint,
) -> c_int
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.