pub trait StreamCipher: Zeroize {
    type E: Error;

    fn new_from_slices(key: &[u8], nonce: &[u8]) -> Result<Self, Self::E>
    where
        Self: Sized
; fn apply_keystream(&mut self, data: &mut [u8]) -> Result<(), Self::E>; }
Expand description

Trait represents stream cipher.

Required Associated Types§

Required Methods§

Create a new stream cipher instance from key and nonce.

Apply keystream to data.

Returns

Error if the end of a keystream will be reached.

Implementors§