Enum openpgp_card::algorithm::AlgoSimple
source · #[non_exhaustive]pub enum AlgoSimple {
RSA1k,
RSA2k,
RSA3k,
RSA4k,
NIST256,
NIST384,
NIST521,
Curve25519,
}
Expand description
A shorthand way to specify algorithms (e.g. for key generation).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
source§impl AlgoSimple
impl AlgoSimple
sourcepub fn matching_algorithm_attributes(
&self,
tx: &mut Transaction<'_>,
key_type: KeyType
) -> Result<AlgorithmAttributes, Error>
pub fn matching_algorithm_attributes( &self, tx: &mut Transaction<'_>, key_type: KeyType ) -> Result<AlgorithmAttributes, Error>
Get algorithm attributes for slot key_type
from this AlgoSimple.
AlgoSimple doesn’t specify card specific details (such as bit-size
of e for RSA, and import format).
This function determines these values based on information from the
card behind tx
.
Trait Implementations§
source§impl Clone for AlgoSimple
impl Clone for AlgoSimple
source§fn clone(&self) -> AlgoSimple
fn clone(&self) -> AlgoSimple
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for AlgoSimple
impl Debug for AlgoSimple
source§impl TryFrom<&str> for AlgoSimple
impl TryFrom<&str> for AlgoSimple
impl Copy for AlgoSimple
Auto Trait Implementations§
impl RefUnwindSafe for AlgoSimple
impl Send for AlgoSimple
impl Sync for AlgoSimple
impl Unpin for AlgoSimple
impl UnwindSafe for AlgoSimple
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