[][src]Function hactool_sys::mbedtls_cipher_auth_decrypt

pub unsafe extern "C" fn mbedtls_cipher_auth_decrypt(
    ctx: *mut mbedtls_cipher_context_t,
    iv: *const c_uchar,
    iv_len: usize,
    ad: *const c_uchar,
    ad_len: usize,
    input: *const c_uchar,
    ilen: usize,
    output: *mut c_uchar,
    olen: *mut usize,
    tag: *const c_uchar,
    tag_len: usize
) -> c_int

\brief Generic autenticated decryption (AEAD ciphers).

\param ctx generic cipher context \param iv IV to use (or NONCE_COUNTER for CTR-mode ciphers) \param iv_len IV length for ciphers with variable-size IV; discarded by ciphers with fixed-size IV. \param ad Additional data to be authenticated. \param ad_len Length of ad. \param input buffer holding the input data \param ilen length of the input data \param output buffer for the output data. Should be able to hold at least ilen. \param olen length of the output data, will be filled with the actual number of bytes written. \param tag buffer holding the authentication tag \param tag_len length of the authentication tag

\returns 0 on success, or MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA, or MBEDTLS_ERR_CIPHER_AUTH_FAILED if data isn't authentic, or a cipher specific error code.

\note If the data is not authentic, then the output buffer is zeroed out to prevent the unauthentic plaintext to be used by mistake, making this interface safer.