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

pub enum CipherType {
    Table,
    Plain,
    None,
    Aes128Cfb,
    Aes128Cfb1,
    Aes128Cfb8,
    Aes128Cfb128,
    Aes192Cfb,
    Aes192Cfb1,
    Aes192Cfb8,
    Aes192Cfb128,
    Aes256Cfb,
    Aes256Cfb1,
    Aes256Cfb8,
    Aes256Cfb128,
    Aes128Ctr,
    Aes192Ctr,
    Aes256Ctr,
    Rc4,
    Rc4Md5,
    ChaCha20,
    Salsa20,
    XSalsa20,
    ChaCha20Ietf,
    Aes128Gcm,
    Aes256Gcm,
    ChaCha20IetfPoly1305,
    XChaCha20IetfPoly1305,
}

ShadowSocks cipher type

Variants

Table
Plain
None
Aes128Cfb
Aes128Cfb1
Aes128Cfb8
Aes128Cfb128
Aes192Cfb
Aes192Cfb1
Aes192Cfb8
Aes192Cfb128
Aes256Cfb
Aes256Cfb1
Aes256Cfb8
Aes256Cfb128
Aes128Ctr
Aes192Ctr
Aes256Ctr
Rc4
Rc4Md5
ChaCha20
Salsa20
XSalsa20
ChaCha20Ietf
Aes128Gcm
Aes256Gcm
ChaCha20IetfPoly1305
XChaCha20IetfPoly1305

Implementations

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

pub fn available_ciphers() -> Vec<&'static str>[src]

Get all available ciphers in String representation

pub fn name(self) -> &'static str[src]

Name of cipher

Trait Implementations

impl Clone for CipherType[src]

impl Copy for CipherType[src]

impl Debug for CipherType[src]

impl Display for CipherType[src]

impl FromStr for CipherType[src]

type Err = Error

The associated error which can be returned from parsing.

impl IntoEnumIterator for CipherType[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

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

type Output = T

Should always be Self

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[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<V, T> VZip<V> for T where
    V: MultiLane<T>,