pub unsafe extern "C" fn esp_aes_gcm_crypt_and_tag(
    ctx: *mut esp_gcm_context,
    mode: c_int,
    length: usize,
    iv: *const c_uchar,
    iv_len: usize,
    aad: *const c_uchar,
    aad_len: usize,
    input: *const c_uchar,
    output: *mut c_uchar,
    tag_len: usize,
    tag: *mut c_uchar
) -> c_int
Expand description

\brief This function performs GCM encryption or decryption of a buffer.

\note For encryption, the output buffer can be the same as the input buffer. For decryption, the output buffer cannot be the same as input buffer. If the buffers overlap, the output buffer must trail at least 8 Bytes behind the input buffer.

\param ctx The GCM context to use for encryption or decryption. \param mode The operation to perform: #MBEDTLS_GCM_ENCRYPT or #MBEDTLS_GCM_DECRYPT. \param length The length of the input data. This must be a multiple of 16 except in the last call before mbedtls_gcm_finish(). \param iv The initialization vector. \param iv_len The length of the IV. \param aad The buffer holding the additional data. \param aad_len The length of the additional data. \param input The buffer holding the input data. \param output The buffer for holding the output data. \param tag_len The length of the tag to generate. \param tag The buffer for holding the tag.

\return \c 0 on success.