Trait shadowsocks::crypto::stream::StreamCipher [] [src]

pub trait StreamCipher {
    fn update<B: BufMut>(
        &mut self,
        data: &[u8],
        out: &mut B
    ) -> CipherResult<()>; fn finalize<B: BufMut>(&mut self, out: &mut B) -> CipherResult<()>; fn buffer_size(&self, data: &[u8]) -> usize; }

Basic operation of Cipher, which is a Symmetric Cipher.

The update method could be called multiple times, and the finalize method will encrypt the last block

Required Methods

Implementors