Function nrfxlib_sys::ocrypto_aes_ccm_init
source · pub unsafe extern "C" fn ocrypto_aes_ccm_init(
ctx: *mut ocrypto_aes_ccm_ctx,
key: *const u8,
size: usize,
nonce: *const u8,
n_len: usize,
tag_len: usize,
pt_len: usize,
aa_len: usize
)
Expand description
AES-CCM initialization.
The context * ctx
- is initialized using the given key * key
- and nonce * nonce
- .
ctx
- Context.key
- AES key. May be NULL.size
- Key size (16, 24, or 32 bytes).nonce
- Nonce. May be NULL.n_len
- Nonce length, 7 <= *n_len
- <= 13.tag_len
- Tag length (4, 6, 8, 10, 12, 14, or 16).pt_len
- Plaintext length, 0 <= *pt_len
- < 2^(8*(15-n_len)).aa_len
- Additional authentication data length.
@remark If * key
- is NULL only * nonce
- and lengths are set. If * nonce
- is NULL only * key
- is set.
Both * key
- and * nonce
- must be set before update is called.