pub enum CipherKind {
Show 49 variants
NONE,
SS_TABLE,
SS_RC4_MD5,
AES_128_CTR,
AES_192_CTR,
AES_256_CTR,
AES_128_CFB1,
AES_128_CFB8,
AES_128_CFB128,
AES_192_CFB1,
AES_192_CFB8,
AES_192_CFB128,
AES_256_CFB1,
AES_256_CFB8,
AES_256_CFB128,
AES_128_OFB,
AES_192_OFB,
AES_256_OFB,
CAMELLIA_128_CTR,
CAMELLIA_192_CTR,
CAMELLIA_256_CTR,
CAMELLIA_128_CFB1,
CAMELLIA_128_CFB8,
CAMELLIA_128_CFB128,
CAMELLIA_192_CFB1,
CAMELLIA_192_CFB8,
CAMELLIA_192_CFB128,
CAMELLIA_256_CFB1,
CAMELLIA_256_CFB8,
CAMELLIA_256_CFB128,
CAMELLIA_128_OFB,
CAMELLIA_192_OFB,
CAMELLIA_256_OFB,
RC4,
CHACHA20,
AES_128_GCM,
AES_256_GCM,
AES_128_CCM,
AES_256_CCM,
AES_128_GCM_SIV,
AES_256_GCM_SIV,
CHACHA20_POLY1305,
XCHACHA20_POLY1305,
SM4_GCM,
SM4_CCM,
AEAD2022_BLAKE3_AES_128_GCM,
AEAD2022_BLAKE3_AES_256_GCM,
AEAD2022_BLAKE3_CHACHA20_POLY1305,
AEAD2022_BLAKE3_CHACHA8_POLY1305,
}Expand description
ShadowSocks cipher type
Variants§
NONE
SS_TABLE
Available on crate feature
v1-stream only.SS_RC4_MD5
Available on crate feature
v1-stream only.AES_128_CTR
Available on crate feature
v1-stream only.AES_192_CTR
Available on crate feature
v1-stream only.AES_256_CTR
Available on crate feature
v1-stream only.AES_128_CFB1
Available on crate feature
v1-stream only.AES_128_CFB8
Available on crate feature
v1-stream only.AES_128_CFB128
Available on crate feature
v1-stream only.AES_192_CFB1
Available on crate feature
v1-stream only.AES_192_CFB8
Available on crate feature
v1-stream only.AES_192_CFB128
Available on crate feature
v1-stream only.AES_256_CFB1
Available on crate feature
v1-stream only.AES_256_CFB8
Available on crate feature
v1-stream only.AES_256_CFB128
Available on crate feature
v1-stream only.AES_128_OFB
Available on crate feature
v1-stream only.AES_192_OFB
Available on crate feature
v1-stream only.AES_256_OFB
Available on crate feature
v1-stream only.CAMELLIA_128_CTR
Available on crate feature
v1-stream only.CAMELLIA_192_CTR
Available on crate feature
v1-stream only.CAMELLIA_256_CTR
Available on crate feature
v1-stream only.CAMELLIA_128_CFB1
Available on crate feature
v1-stream only.CAMELLIA_128_CFB8
Available on crate feature
v1-stream only.CAMELLIA_128_CFB128
Available on crate feature
v1-stream only.CAMELLIA_192_CFB1
Available on crate feature
v1-stream only.CAMELLIA_192_CFB8
Available on crate feature
v1-stream only.CAMELLIA_192_CFB128
Available on crate feature
v1-stream only.CAMELLIA_256_CFB1
Available on crate feature
v1-stream only.CAMELLIA_256_CFB8
Available on crate feature
v1-stream only.CAMELLIA_256_CFB128
Available on crate feature
v1-stream only.CAMELLIA_128_OFB
Available on crate feature
v1-stream only.CAMELLIA_192_OFB
Available on crate feature
v1-stream only.CAMELLIA_256_OFB
Available on crate feature
v1-stream only.RC4
Available on crate feature
v1-stream only.CHACHA20
Available on crate feature
v1-stream only.AES_128_GCM
Available on crate feature
v1-aead only.AEAD_AES_128_GCM
AES_256_GCM
Available on crate feature
v1-aead only.AEAD_AES_256_GCM
AES_128_CCM
Available on crate feature
v1-aead-extra only.AEAD_AES_128_CCM
AES_256_CCM
Available on crate feature
v1-aead-extra only.AEAD_AES_256_CCM
AES_128_GCM_SIV
Available on crate feature
v1-aead-extra only.AEAD_AES_128_GCM_SIV
AES_256_GCM_SIV
Available on crate feature
v1-aead-extra only.AEAD_AES_256_GCM_SIV
CHACHA20_POLY1305
Available on crate feature
v1-aead only.AEAD_CHACHA20_POLY1305
XCHACHA20_POLY1305
Available on crate feature
v1-aead-extra only.AEAD_XCHACHA20_POLY1305
SM4_GCM
Available on crate feature
v1-aead-extra only.SM4_GCM
SM4_CCM
Available on crate feature
v1-aead-extra only.SM4_GCM
AEAD2022_BLAKE3_AES_128_GCM
Available on crate feature
v2 only.2022-blake3-aes-128-gcm
AEAD2022_BLAKE3_AES_256_GCM
Available on crate feature
v2 only.2022-blake3-aes-128-gcm
AEAD2022_BLAKE3_CHACHA20_POLY1305
Available on crate feature
v2 only.2022-blake3-chacha20-poly1305
AEAD2022_BLAKE3_CHACHA8_POLY1305
Available on crate feature
v2-extra only.2022-blake3-chacha8-poly1305
Implementations§
Source§impl CipherKind
impl CipherKind
Sourcepub fn category(&self) -> CipherCategory
pub fn category(&self) -> CipherCategory
The category of the cipher
Sourcepub fn is_stream(&self) -> bool
Available on crate feature v1-stream only.
pub fn is_stream(&self) -> bool
v1-stream only.Check if the current cipher is a stream cipher
Sourcepub fn is_aead(&self) -> bool
Available on crate feature v1-aead only.
pub fn is_aead(&self) -> bool
v1-aead only.Check if the current cipher is an AEAD cipher
pub fn is_aead_2022(&self) -> bool
Available on crate feature
v2 only.Sourcepub fn iv_len(&self) -> usize
Available on crate feature v1-stream only.
pub fn iv_len(&self) -> usize
v1-stream only.Stream Cipher’s initializer vector length
Sourcepub fn tag_len(&self) -> usize
Available on crate features v1-aead or v2 only.
pub fn tag_len(&self) -> usize
v1-aead or v2 only.AEAD Cipher’s TAG length
Trait Implementations§
Source§impl Clone for CipherKind
impl Clone for CipherKind
Source§fn clone(&self) -> CipherKind
fn clone(&self) -> CipherKind
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CipherKind
impl Debug for CipherKind
Source§impl Display for CipherKind
impl Display for CipherKind
Source§impl FromStr for CipherKind
impl FromStr for CipherKind
Source§impl Hash for CipherKind
impl Hash for CipherKind
Source§impl PartialEq for CipherKind
impl PartialEq for CipherKind
impl Copy for CipherKind
impl Eq for CipherKind
impl StructuralPartialEq for CipherKind
Auto Trait Implementations§
impl Freeze for CipherKind
impl RefUnwindSafe for CipherKind
impl Send for CipherKind
impl Sync for CipherKind
impl Unpin for CipherKind
impl UnwindSafe for CipherKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more