Enum tss_esapi::structures::Sensitive

source ·
pub enum Sensitive {
    Rsa {
        auth_value: Auth,
        seed_value: Digest,
        sensitive: PrivateKeyRsa,
    },
    Ecc {
        auth_value: Auth,
        seed_value: Digest,
        sensitive: EccParameter,
    },
    Bits {
        auth_value: Auth,
        seed_value: Digest,
        sensitive: SensitiveData,
    },
    Symmetric {
        auth_value: Auth,
        seed_value: Digest,
        sensitive: SymmetricKey,
    },
}
Expand description

Enum describing the Sensitive part of an object.

§Details

This corresponds to TPMT_SENSITIVE

Variants§

§

Rsa

Fields

§auth_value: Auth
§seed_value: Digest
§sensitive: PrivateKeyRsa
§

Ecc

Fields

§auth_value: Auth
§seed_value: Digest
§sensitive: EccParameter
§

Bits

Fields

§auth_value: Auth
§seed_value: Digest
§sensitive: SensitiveData
§

Symmetric

Fields

§auth_value: Auth
§seed_value: Digest
§sensitive: SymmetricKey

Implementations§

source§

impl Sensitive

source

pub fn auth_value(&self) -> &Auth

Get the authentication value of the object

source

pub fn seed_value(&self) -> &Digest

Get the seed value of the object

source

pub fn sensitive_type(&self) -> PublicAlgorithm

Trait Implementations§

source§

impl Clone for Sensitive

source§

fn clone(&self) -> Sensitive

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Sensitive

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<Sensitive> for TPMT_SENSITIVE

source§

fn from(sensitive: Sensitive) -> Self

Converts to this type from the input type.
source§

impl Marshall for Sensitive

source§

fn marshall(&self) -> Result<Vec<u8>>

Produce a marshalled TPMT_SENSITIVE

Note: for TPM2B_SENSITIVE marshalling use SensitiveBuffer

source§

const BUFFER_SIZE: usize = 1_416usize

source§

impl PartialEq for Sensitive

source§

fn eq(&self, other: &Sensitive) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl TryFrom<Sensitive> for SensitiveBuffer

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(sensitive: Sensitive) -> Result<SensitiveBuffer>

Performs the conversion.
source§

impl TryFrom<Sensitive> for TPM2B_SENSITIVE

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(sensitive: Sensitive) -> Result<Self>

Performs the conversion.
source§

impl TryFrom<SensitiveBuffer> for Sensitive

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(buf: SensitiveBuffer) -> Result<Self>

Performs the conversion.
source§

impl TryFrom<TPM2B_SENSITIVE> for Sensitive

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(tpm2b_sensitive: TPM2B_SENSITIVE) -> Result<Self>

Performs the conversion.
source§

impl TryFrom<TPMT_SENSITIVE> for Sensitive

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(tpmt_sensitive: TPMT_SENSITIVE) -> Result<Sensitive>

Performs the conversion.
source§

impl UnMarshall for Sensitive

source§

fn unmarshall(marshalled_data: &[u8]) -> Result<Self>

Unmarshall the structure from TPMT_SENSITIVE

Note: for TPM2B_SENSITIVE marshalling use SensitiveBuffer

source§

impl Eq for Sensitive

source§

impl StructuralPartialEq for Sensitive

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> Free for T

source§

unsafe fn free(ptr_ref: NonNull<T>)

Drops the content pointed by this pointer and frees it. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.