Function nrfxlib_sys::ocrypto_aes_cbc_pkcs_init
source · pub unsafe extern "C" fn ocrypto_aes_cbc_pkcs_init(
ctx: *mut ocrypto_aes_cbc_pkcs_ctx,
key: *const u8,
size: usize,
iv: *const u8,
decrypt: c_int
)
Expand description
AES-CBC initialization.
The context * ctx
- is initialized using the given key * key
- and initial vector * iv
- .
ctx
- Context.key
- AES key. May be NULL.size
- Key size (16, 24, or 32 bytes).iv
- Initial vector. May be NULL.decrypt
- If 0, initialize for encryption; If 1, initialize for decryption.
@remark If * key
- is NULL only * iv
- is set. If * iv
- is NULL only * key
- is set.
If not set by the same call, * key
- must be set before * iv
- .