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

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

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

Loading content...

Implementors

impl StreamCipher for StreamCipherVariant[src]

impl StreamCipher for DummyCipher[src]

impl StreamCipher for OpenSSLCipher[src]

impl StreamCipher for Rc4Md5Cipher[src]

impl StreamCipher for SodiumStreamCipher[src]

impl StreamCipher for TableCipher[src]

Loading content...