Trait chacha::KeyStream

source ·
pub trait KeyStream {
    // Required method
    fn xor_read(&mut self, dest: &mut [u8]) -> Result<(), Error>;
}
Expand description

Types that encapsulate a stream of bytes that to be combined with a cryptographic plaintext or ciphertext

Required Methods§

source

fn xor_read(&mut self, dest: &mut [u8]) -> Result<(), Error>

XORs keystream bytes with dest.

If the end of the keystream is reached, this returns an error and the contents of dest are undefined.

Implementors§