[−][src]Struct tss_esapi::constants::algorithm::Cipher
Block cipher identifiers
Structure useful for handling an abstract representation of ciphers. Ciphers are defined foremost through their symmetric algorithm and, depending on the type of that algorithm, on a set of other values.
Implementations
impl Cipher
[src]
pub fn aes(mode: EncryptionMode, key_bits: u16) -> Result<Self>
[src]
Constructor for AES cipher identifier
key_bits
must be one of 128, 192 or 256.
pub fn camellia(mode: EncryptionMode, key_bits: u16) -> Result<Self>
[src]
Constructor for Camellia cipher identifier
key_bits
must be one of 128, 192 or 256.
pub fn tdes(mode: EncryptionMode, key_bits: u16) -> Result<Self>
[src]
Constructor for Triple DES cipher identifier
key_bits
must be one of 56, 112 or 168.
pub fn sm4(mode: EncryptionMode) -> Self
[src]
Constructor for SM4 cipher identifier
pub fn xor(hash: HashingAlgorithm) -> Self
[src]
Constructor for XOR "cipher" identifier
pub fn object_type() -> TPM2_ALG_ID
[src]
Get general object type for symmetric ciphers.
pub fn key_bits(self) -> Option<u16>
[src]
Get the cipher key length.
pub fn mode(self) -> Option<EncryptionMode>
[src]
Get the cipher mode.
pub fn hash(self) -> Option<HashingAlgorithm>
[src]
Get the hash algorithm used with an XOR cipher
pub fn algorithm_id(self) -> TPM2_ALG_ID
[src]
Get the TSS algorithm ID.
pub fn aes_128_cfb() -> Self
[src]
Constructor for 128 bit AES in CFB mode.
pub fn aes_256_cfb() -> Self
[src]
Constructor for 256 bit AES in CFB mode.
Trait Implementations
impl Clone for Cipher
[src]
impl Copy for Cipher
[src]
impl Debug for Cipher
[src]
impl From<Cipher> for TPMT_SYM_DEF
[src]
impl From<Cipher> for TPMT_SYM_DEF_OBJECT
[src]
impl From<Cipher> for TPMS_SYMCIPHER_PARMS
[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Free for T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
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, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,