[][src]Enum yubihsm::algorithm::AsymmetricAlg

#[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]

pub fn from_u8(tag: u8) -> Result<Self, AlgorithmError>[src]

Convert an unsigned byte tag into an AsymmetricAlgorithm (if valid)

pub fn to_u8(self) -> u8[src]

Serialize algorithm ID as a byte

pub fn key_len(self) -> usize[src]

Return the size of the given key (as expected by the YubiHSM2) in bytes

Trait Implementations

impl Eq for AsymmetricAlg[src]

impl Clone for AsymmetricAlg[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for AsymmetricAlg[src]

impl PartialEq<AsymmetricAlg> for AsymmetricAlg[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl From<AsymmetricAlg> for Algorithm[src]

impl Debug for AsymmetricAlg[src]

impl Serialize for AsymmetricAlg[src]

impl<'de> Deserialize<'de> for AsymmetricAlg[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Same for T

type Output = T

Should always be Self