[][src]Enum shadowsocks::crypto::cipher::CipherType

pub enum CipherType {
    Table,
    Plain,
    Aes128Cfb,
    Aes128Cfb1,
    Aes128Cfb8,
    Aes128Cfb128,
    Aes256Cfb,
    Aes256Cfb1,
    Aes256Cfb8,
    Aes256Cfb128,
    Rc4,
    Rc4Md5,
    ChaCha20,
    Salsa20,
    XSalsa20,
    ChaCha20Ietf,
    Aes128Gcm,
    Aes256Gcm,
    ChaCha20IetfPoly1305,
    XChaCha20IetfPoly1305,
}

ShadowSocks cipher type

Variants

TablePlainAes128CfbAes128Cfb1Aes128Cfb8Aes128Cfb128Aes256CfbAes256Cfb1Aes256Cfb8Aes256Cfb128Rc4Rc4Md5ChaCha20Salsa20XSalsa20ChaCha20IetfAes128GcmAes256GcmChaCha20IetfPoly1305XChaCha20IetfPoly1305

Methods

impl CipherType[src]

pub fn key_size(self) -> usize[src]

Symmetric crypto key size

pub fn bytes_to_key(self, key: &[u8]) -> Bytes[src]

Extends key to match the required key length

pub fn iv_size(self) -> usize[src]

Symmetric crypto initialize vector size

pub fn gen_init_vec(self) -> Bytes[src]

Generate a random initialize vector for this cipher

pub fn category(self) -> CipherCategory[src]

Get category of cipher

pub fn tag_size(self) -> usize[src]

Get tag size for AEAD Ciphers

pub fn salt_size(self) -> usize[src]

Get nonce size for AEAD ciphers

pub fn gen_salt(self) -> Bytes[src]

Get salt for AEAD ciphers

Trait Implementations

impl Clone for CipherType[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for CipherType[src]

impl Display for CipherType[src]

impl Debug for CipherType[src]

impl FromStr for CipherType[src]

type Err = Error

The associated error which can be returned from parsing.

Auto Trait Implementations

impl Send for CipherType

impl Sync for CipherType

Blanket Implementations

impl<T> From for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[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> Any for T where
    T: 'static + ?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> Erased for T

impl<T> Same for T[src]

type Output = T

Should always be Self