Function esp_idf_svc::hal::sys::esp_aes_gcm_setkey

source ยท
pub unsafe extern "C" fn esp_aes_gcm_setkey(
    ctx: *mut esp_gcm_context,
    cipher: u32,
    key: *const u8,
    keybits: u32,
) -> i32
Expand description

\brief This function associates a GCM context with a key.

\param ctx The GCM context to initialize. \param cipher The 128-bit block cipher to use. \param key The encryption key. \param keybits The key size in bits. Valid options are:

  • 128 bits
  • 192 bits
  • 256 bits

\return \c 0 on success. \return A cipher-specific error code on failure.