[][src]Struct tss_esapi::constants::algorithm::Cipher

pub struct Cipher { /* fields omitted */ }

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[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]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.