Enum yubihsm::algorithm::AsymmetricAlg [−][src]
#[repr(u8)]pub enum AsymmetricAlg { RSA_2048, RSA_3072, RSA_4096, Ed25519, EC_P224, EC_P256, EC_P384, EC_P521, EC_K256, EC_BP256, EC_BP384, EC_BP512, }
Asymmetric algorithms (RSA or ECC)
Variants
RSA_2048
2048-bit RSA
RSA_3072
3072-bit RSA
RSA_4096
4096-bit RSA
Ed25519
Ed25519
EC_P224
NIST P-224 (secp224r1)
EC_P256
NIST P-256 (secp256r1, prime256v1)
EC_P384
NIST P-384 (secp384r1)
EC_P521
P-521 (secp521r1)
EC_K256
secp256k1
EC_BP256
brainpool256r1
EC_BP384
brainpool384r1
EC_BP512
brainpool512r1
Methods
impl AsymmetricAlg
[src]
impl AsymmetricAlg
pub fn from_u8(tag: u8) -> Result<Self, AlgorithmError>
[src]
pub fn from_u8(tag: u8) -> Result<Self, AlgorithmError>
Convert an unsigned byte tag into an AsymmetricAlgorithm
(if valid)
pub fn to_u8(self) -> u8
[src]
pub fn to_u8(self) -> u8
Serialize algorithm ID as a byte
pub fn key_len(self) -> usize
[src]
pub fn key_len(self) -> usize
Return the size of the given key (as expected by the YubiHSM2
) in bytes
Trait Implementations
impl Copy for AsymmetricAlg
[src]
impl Copy for AsymmetricAlg
impl Clone for AsymmetricAlg
[src]
impl Clone for AsymmetricAlg
fn clone(&self) -> AsymmetricAlg
[src]
fn clone(&self) -> AsymmetricAlg
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for AsymmetricAlg
[src]
impl Debug for AsymmetricAlg
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Eq for AsymmetricAlg
[src]
impl Eq for AsymmetricAlg
impl PartialEq for AsymmetricAlg
[src]
impl PartialEq for AsymmetricAlg
fn eq(&self, other: &AsymmetricAlg) -> bool
[src]
fn eq(&self, other: &AsymmetricAlg) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl From<AsymmetricAlg> for Algorithm
[src]
impl From<AsymmetricAlg> for Algorithm
fn from(alg: AsymmetricAlg) -> Algorithm
[src]
fn from(alg: AsymmetricAlg) -> Algorithm
Performs the conversion.
impl Serialize for AsymmetricAlg
[src]
impl Serialize for AsymmetricAlg
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>
[src]
fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>
Serialize this value into the given Serde serializer. Read more
impl<'de> Deserialize<'de> for AsymmetricAlg
[src]
impl<'de> Deserialize<'de> for AsymmetricAlg
fn deserialize<D: Deserializer<'de>>(
deserializer: D
) -> Result<AsymmetricAlg, D::Error>
[src]
fn deserialize<D: Deserializer<'de>>(
deserializer: D
) -> Result<AsymmetricAlg, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl Send for AsymmetricAlg
impl Send for AsymmetricAlg
impl Sync for AsymmetricAlg
impl Sync for AsymmetricAlg