pub enum EccScheme {
EcDsa(HashScheme),
EcDh(HashScheme),
EcDaa(EcDaaScheme),
Sm2(HashScheme),
EcSchnorr(HashScheme),
EcMqv(HashScheme),
Null,
}Expand description
Enum representing the ecc scheme
§Details
This corresponds to TPMT_ECC_SCHEME. This uses a subset of the TPMU_ASYM_SCHEME that has the TPMI_ALG_ECC_SCHEME as selector.
Variants§
EcDsa(HashScheme)
EcDh(HashScheme)
EcDaa(EcDaaScheme)
Sm2(HashScheme)
EcSchnorr(HashScheme)
EcMqv(HashScheme)
Null
Implementations§
Source§impl EccScheme
impl EccScheme
Sourcepub fn create(
ecc_scheme_algorithm: EccSchemeAlgorithm,
hashing_algorithm: Option<HashingAlgorithm>,
count: Option<u16>,
) -> Result<Self>
pub fn create( ecc_scheme_algorithm: EccSchemeAlgorithm, hashing_algorithm: Option<HashingAlgorithm>, count: Option<u16>, ) -> Result<Self>
Creates a EccScheme.
§Arguments
ecc_scheme_algorithm - The ECC scheme algorithm.
hashing_algorithm - The hashing algorithm associated with some variants.
count - The counter value that is used between TPM2_Commit() and the sign
operation used in the EcDaa variant.
§Errors
ParamMissing - If the algorithm indicates a variant that requires
one or more of the optional parameters and they have
not been provided.
InconsistentParams - If an optional parameter has been set but it is
not required.
pub fn algorithm(&self) -> EccSchemeAlgorithm
Trait Implementations§
Source§impl From<EccScheme> for TPMT_ECC_SCHEME
impl From<EccScheme> for TPMT_ECC_SCHEME
Source§impl TryFrom<TPMT_ECC_SCHEME> for EccScheme
impl TryFrom<TPMT_ECC_SCHEME> for EccScheme
impl Copy for EccScheme
impl Eq for EccScheme
impl StructuralPartialEq for EccScheme
Auto Trait Implementations§
impl Freeze for EccScheme
impl RefUnwindSafe for EccScheme
impl Send for EccScheme
impl Sync for EccScheme
impl Unpin for EccScheme
impl UnsafeUnpin for EccScheme
impl UnwindSafe for EccScheme
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more