[][src]Function sodiumoxide::crypto::stream::salsa20::stream_xor_inplace

pub fn stream_xor_inplace(m: &mut [u8], n: &Nonce, k: &Key)

stream_xor_inplace() encrypts a message m using a secret key k and a nonce n. The stream_xor_inplace() function encrypts the message in place.

stream_xor_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_inplace() can also be used to decrypt.