[−][src]Enum shadowsocks::crypto::cipher::CipherType
ShadowSocks cipher type
Variants
TablePlainAes128CfbAes128Cfb1Aes128Cfb8Aes128Cfb128Aes256CfbAes256Cfb1Aes256Cfb8Aes256Cfb128Rc4Rc4Md5ChaCha20Salsa20XSalsa20ChaCha20IetfAes128GcmAes256GcmChaCha20IetfPoly1305XChaCha20IetfPoly1305Methods
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(&self) -> 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]
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]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom for T where
U: Into<T>, [src]
U: Into<T>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Erased for T
impl<T> Same for T[src]
type Output = T
Should always be Self