Function esp_idf_sys::esp_aes_gcm_auth_decrypt
source ยท pub unsafe extern "C" fn esp_aes_gcm_auth_decrypt(
ctx: *mut esp_gcm_context,
length: usize,
iv: *const c_uchar,
iv_len: usize,
aad: *const c_uchar,
aad_len: usize,
tag: *const c_uchar,
tag_len: usize,
input: *const c_uchar,
output: *mut c_uchar,
) -> c_int
Expand description
\brief This function performs a GCM authenticated decryption of a buffer.
\note 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. \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 tag The buffer holding the tag. \param tag_len The length of the tag. \param input The buffer holding the input data. \param output The buffer for holding the output data.
\return 0 if successful and authenticated. \return #MBEDTLS_ERR_GCM_AUTH_FAILED if the tag does not match.