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
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
Implementors
impl StreamCipher for OpenSSLCipherimpl StreamCipher for TableCipherimpl StreamCipher for Rc4Md5Cipherimpl StreamCipher for CryptoCipherimpl StreamCipher for DummyCipherimpl StreamCipher for StreamCipherVariant