pub unsafe extern "C" fn ocrypto_aes_eax_decrypt(
    pt: *mut u8,
    tag: *const u8,
    ct: *const u8,
    ct_len: usize,
    key: *const u8,
    size: usize,
    iv: *const u8,
    iv_len: usize,
    aa: *const u8,
    aa_len: usize
) -> c_int
Expand description

AES-EAX decryption.

  • pt - Plaintext.
  • tag - Authentication tag.
  • ct - Ciphertext.
  • ct_len - Length of * pt - and * ct - .
  • key - AES key.
  • size - Key size (16, 24, or 32 bytes).
  • iv - Initial vector.
  • iv_len - Initial vector length.
  • aa - Additional authentication data.
  • aa_len - Additional authentication data length.

@remark * ct - may be same as * pt - .

Returns 0 If * tag - is valid. Returns -1 Otherwise.