c2_chacha::stream_cipher

Trait StreamCipher

Source
pub trait StreamCipher {
    // Required methods
    fn encrypt(&mut self, data: &mut [u8]);
    fn decrypt(&mut self, data: &mut [u8]);
}
Expand description

Stream cipher core trait which covers both synchronous and asynchronous ciphers.

Note that for synchronous ciphers encrypt and decrypt are equivalent to each other.

Required Methods§

Source

fn encrypt(&mut self, data: &mut [u8])

Encrypt data in place.

Source

fn decrypt(&mut self, data: &mut [u8])

Decrypt data in place.

Implementors§

Source§

impl<C> StreamCipher for C