Function sodiumoxide::crypto::stream::chacha20::stream_xor_ic_inplace
[−]
[src]
pub fn stream_xor_ic_inplace(m: &mut [u8], Nonce: &Nonce, ic: u64, Key: &Key)
stream_xor_ic_inplace() encrypts a message m using a secret key k and a nonce n,
it is similar to stream_xor_inplace() but allows the caller to set the value of the initial
block counter ic.
The stream_xor_ic_inplace() function encrypts the message in place.
stream_xor_ic_inplace() guarantees that the ciphertext has the same length as
the plaintext, and is the plaintext xor the output of stream_inplace().
Consequently stream_xor_ic_inplace() can also be used to decrypt.