pub enum RsaScheme {
RsaSsa(HashScheme),
RsaEs,
RsaPss(HashScheme),
Oaep(HashScheme),
Null,
}Expand description
Enum representing the rsa scheme
§Details
This corresponds to TPMT_RSA_SCHEME. This uses a subset of the TPMU_ASYM_SCHEME that has the TPMI_ALG_RSA_SCHEME as selector.
Variants§
Implementations§
Source§impl RsaScheme
impl RsaScheme
Sourcepub fn create(
rsa_scheme_algorithm: RsaSchemeAlgorithm,
hashing_algorithm: Option<HashingAlgorithm>,
) -> Result<RsaScheme>
pub fn create( rsa_scheme_algorithm: RsaSchemeAlgorithm, hashing_algorithm: Option<HashingAlgorithm>, ) -> Result<RsaScheme>
Creates a new RsaScheme
§Arguments
rsa_scheme_algorithm - The RsaSchemeAlgorithm associated with variant.
hashing_algorithm - A hashing algorithm that is required by some of the
variants.
§Errors
ParamMissing - If optional parameter is not provided when it is required.
I.e. when creating RSA scheme of type RSA SSA, RSA PSS and
OAEP.
InconsistentParams - If the optional parameter has been provided when it is
not required. I.e. if a hashing algorithm is provided
when creating a the RSA scheme of type Null.
Sourcepub fn algorithm(&self) -> RsaSchemeAlgorithm
pub fn algorithm(&self) -> RsaSchemeAlgorithm
Returns the rsa scheme algorithm
Trait Implementations§
Source§impl From<RsaScheme> for TPMT_RSA_SCHEME
impl From<RsaScheme> for TPMT_RSA_SCHEME
Source§impl TryFrom<RsaScheme> for RsaDecryptionScheme
impl TryFrom<RsaScheme> for RsaDecryptionScheme
Source§impl TryFrom<TPMT_RSA_SCHEME> for RsaScheme
impl TryFrom<TPMT_RSA_SCHEME> for RsaScheme
impl Copy for RsaScheme
impl Eq for RsaScheme
impl StructuralPartialEq for RsaScheme
Auto Trait Implementations§
impl Freeze for RsaScheme
impl RefUnwindSafe for RsaScheme
impl Send for RsaScheme
impl Sync for RsaScheme
impl Unpin for RsaScheme
impl UnsafeUnpin for RsaScheme
impl UnwindSafe for RsaScheme
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