[][src]Struct tss_esapi::utils::TpmsEccParmsBuilder

pub struct TpmsEccParmsBuilder {
    pub symmetric: Option<Cipher>,
    pub scheme: AsymSchemeUnion,
    pub curve: EllipticCurve,
    pub for_signing: bool,
    pub for_decryption: bool,
    pub restricted: bool,
}

Builder for TPMS_ECC_PARMS values.

Fields

symmetric: Option<Cipher>

Symmetric cipher to be used in conjuction with the key

scheme: AsymSchemeUnion

Asymmetric scheme to be used for key operations

curve: EllipticCurve

Curve to be used with the key

for_signing: bool

Flag indicating whether the key shall be used for signing

for_decryption: bool

Flag indicating whether the key shall be used for decryption

restricted: bool

Flag indicating whether the key is restricted

Implementations

impl TpmsEccParmsBuilder[src]

pub fn new_restricted_decryption_key(
    symmetric: Cipher,
    curve: EllipticCurve
) -> Self
[src]

Create parameters for a restricted decryption key (i.e. a storage key)

pub fn new_unrestricted_signing_key(
    scheme: AsymSchemeUnion,
    curve: EllipticCurve
) -> Self
[src]

Create parameters for an unrestricted signing key

pub fn build(self) -> Result<TPMS_ECC_PARMS>[src]

Build an object given the previously provded parameters.

The only mandatory parameters are the asymmetric scheme and the elliptic curve.

Errors

  • if no asymmetric scheme is set, ParamsMissing wrapper error is returned.
  • if the for_signing, for_decryption and restricted parameters are inconsistent with the rest of the parameters, InconsistentParams wrapper error is returned

Trait Implementations

impl Clone for TpmsEccParmsBuilder[src]

impl Copy for TpmsEccParmsBuilder[src]

impl Debug for TpmsEccParmsBuilder[src]

Auto Trait Implementations

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.