[−][src]Function sodalite::stream_xsalsa20_xor
pub fn stream_xsalsa20_xor(
c_text: &mut [u8],
message: &[u8],
nonce: &StreamXSalsa20Nonce,
key: &StreamXSalsa20Key
)
Encrypt message
into c_text
using nonce
and key
by xoring message with a stream.
As a result, can be used to decrypt by passing encrypted text in message
, and reading
decrypted text from c_text
.
Panics
- If
c_text.len() != message.len()