pub unsafe extern "C" fn ocrypto_aes_ccm_decrypt(
pt: *mut u8,
tag: *const u8,
tag_len: usize,
ct: *const u8,
ct_len: usize,
key: *const u8,
size: usize,
nonce: *const u8,
n_len: usize,
aa: *const u8,
aa_len: usize,
) -> c_intExpand description
AES-CCM decryption.
pt- Plaintext.tag- Authentication tag.tag_len- Tag length (4, 6, 8, 10, 12, 14, or 16).ct- Ciphertext.ct_len- Ciphertext length, 0 <= *ct_len- < 2^(8*(15-n_len)).key- AES key.size- Key size (16, 24, or 32).nonce- Nonce.n_len- Nonce length, 7 <= *n_len- <= 13.aa- Additional authentication data.aa_len- Additional authentication data length.
Returns 0 If * tag - is valid.
Returns -1 Otherwise.
@remark * ct - may be same as * pt - .