Enum parsec_interface::operations::psa_algorithm::Cipher
source · [−]pub enum Cipher {
StreamCipher,
Ctr,
Cfb,
Ofb,
Xts,
EcbNoPadding,
CbcNoPadding,
CbcPkcs7,
}
Expand description
Enumeration of symmetric encryption algorithms supported.
Variants
StreamCipher
The stream cipher mode of a stream cipher algorithm.
Ctr
A stream cipher built using the Counter (CTR) mode of a block cipher.
Cfb
A stream cipher built using the Cipher Feedback (CFB) mode of a block cipher.
Ofb
A stream cipher built using the Output Feedback (OFB) mode of a block cipher.
Xts
The XTS cipher mode of a block cipher.
EcbNoPadding
The Electronic Code Book (ECB) mode of a block cipher, with no padding.
CbcNoPadding
The Cipher Block Chaining (CBC) mode of a block cipher, with no padding.
CbcPkcs7
The Cipher Block Chaining (CBC) mode of a block cipher, with PKCS#7 padding.
Implementations
sourceimpl Cipher
impl Cipher
sourcepub fn is_block_cipher_mode(self) -> bool
pub fn is_block_cipher_mode(self) -> bool
Check is the cipher algorithm is a mode of a block cipher.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Cipher
impl<'de> Deserialize<'de> for Cipher
sourcepub fn deserialize<__D>(
__deserializer: __D
) -> Result<Cipher, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<Cipher, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Serialize for Cipher
impl Serialize for Cipher
sourcepub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for Cipher
impl StructuralPartialEq for Cipher
Auto Trait Implementations
impl RefUnwindSafe for Cipher
impl Send for Cipher
impl Sync for Cipher
impl Unpin for Cipher
impl UnwindSafe for Cipher
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more