Function nrfxlib_sys::ocrypto_aes_gcm_decrypt
source · pub unsafe extern "C" fn ocrypto_aes_gcm_decrypt(
pt: *mut u8,
tag: *const u8,
tag_len: usize,
ct: *const u8,
ct_len: usize,
key: *const u8,
size: usize,
iv: *const u8,
aa: *const u8,
aa_len: usize
) -> c_int
Expand description
AES-GCM decryption.
pt
- Plaintext.tag
- Authentication tag.tag_len
- Authentication tag length, 0 < *tag_len
- <= 16.ct
- Ciphertext.ct_len
- Ciphertext length, 0 < *ct_len
- < 2^36-32 bytes.key
- AES key.size
- Key size (16, 24, or 32 bytes).iv
- Initial vector.aa
- Additional authentication data.aa_len
- Additional authentication data length, 0 < *aa_len
- < 2^61 bytes.
@remark * ct
- may be same as * pt
- .
Returns 0 If * tag
- is valid.
Returns -1 Otherwise.