Enum shadowsocks::crypto::cipher::CipherType
[−]
[src]
pub enum CipherType { Table, Dummy, Aes128Cfb, Aes128Cfb1, Aes128Cfb8, Aes128Cfb128, Aes256Cfb, Aes256Cfb1, Aes256Cfb8, Aes256Cfb128, Rc4, Rc4Md5, ChaCha20, Salsa20, Aes128Gcm, Aes192Gcm, Aes256Gcm, }
ShadowSocks cipher type
Variants
Table
Dummy
Aes128Cfb
Aes128Cfb1
Aes128Cfb8
Aes128Cfb128
Aes256Cfb
Aes256Cfb1
Aes256Cfb8
Aes256Cfb128
Rc4
Rc4Md5
ChaCha20
Salsa20
Aes128Gcm
Aes192Gcm
Aes256Gcm
Methods
impl CipherType
[src]
fn key_size(&self) -> usize
Symmetric crypto key size
fn bytes_to_key(&self, key: &[u8]) -> Bytes
Extends key to match the required key length
fn iv_size(&self) -> usize
Symmetric crypto initialize vector size
fn gen_init_vec(&self) -> Bytes
Generate a random initialize vector for this cipher
fn category(&self) -> CipherCategory
Get category of cipher
fn tag_size(&self) -> usize
Get tag size for AEAD Ciphers
fn salt_size(&self) -> usize
Get nonce size for AEAD ciphers
fn gen_salt(&self) -> Bytes
Get salt for AEAD ciphers
Trait Implementations
impl Clone for CipherType
[src]
fn clone(&self) -> CipherType
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Debug for CipherType
[src]
impl Copy for CipherType
[src]
impl FromStr for CipherType
[src]
type Err = Error
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<CipherType, Error>
Parses a string s
to return a value of this type. Read more