Function parity_crypto::aes::encrypt_128_ctr
source · [−]pub fn encrypt_128_ctr(
k: &[u8],
iv: &[u8],
plain: &[u8],
dest: &mut [u8]
) -> Result<(), SymmError>Expand description
Encrypt a message (CTR mode).
Key (k) length and initialisation vector (iv) length have to be 16 bytes each.
An error is returned if the input lengths are invalid.
If possible prefer inplace_encrypt_128_ctr to avoid a slice copy.