[][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

impl Unpin for Cipher

impl UnwindSafe for Cipher

impl RefUnwindSafe for Cipher

Blanket Implementations

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

impl<T> From<T> for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

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

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

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

impl<T> Erased for T