Function esp_idf_svc::hal::sys::esp_aes_gcm_update_ad

source ยท
pub unsafe extern "C" fn esp_aes_gcm_update_ad(
    ctx: *mut esp_gcm_context,
    aad: *const u8,
    aad_len: usize,
) -> i32
Expand description

\brief This function feeds an input buffer as associated data (authenticated but not encrypted data) in a GCM encryption or decryption operation.

             Call this function after mbedtls_gcm_starts() to pass
             the associated data. If the associated data is empty,
             you do not need to call this function. You may not
             call this function after calling mbedtls_cipher_update().

\param ctx The GCM context. This must have been started with mbedtls_gcm_starts() and must not have yet received any input with mbedtls_gcm_update(). \param aad The buffer holding the additional data, or \c NULL if \p aad_len is \c 0. \param aad_len The length of the additional data. If \c 0, \p add may be \c NULL.

\return \c 0 on success.