[][src]Struct shadowsocks_rs::cipher::Cipher

pub struct Cipher {
    pub cipher: Cipher,
    pub key: Vec<u8>,
    pub iv: Vec<u8>,
    pub iv_len: usize,
    pub enc: Option<Crypter>,
    pub dec: Option<Crypter>,
}

Fields

cipher: Cipherkey: Vec<u8>iv: Vec<u8>iv_len: usizeenc: Option<Crypter>dec: Option<Crypter>

Methods

impl Cipher
[src]

pub fn new(method: &str, password: &str) -> Cipher
[src]

pub fn init_encrypt(&mut self)
[src]

pub fn init_decrypt(&mut self, iv: &[u8])
[src]

pub fn encrypt(&mut self, input: &[u8]) -> Option<Vec<u8>>
[src]

pub fn decrypt(&mut self, input: &[u8]) -> Option<Vec<u8>>
[src]

pub fn reset(&self) -> Cipher
[src]

Auto Trait Implementations

impl Send for Cipher

impl Sync for Cipher

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T