[][src]Enum mundane::public::rsa::RsaPrivKeyAnyBits

pub enum RsaPrivKeyAnyBits {
    B2048(RsaPrivKey<B2048>),
    B3072(RsaPrivKey<B3072>),
    B4096(RsaPrivKey<B4096>),
    B6144(RsaPrivKey<B6144>),
    B8192(RsaPrivKey<B8192>),
}

An RSA private key whose bit length is unknown at compile time.

An RsaPrivKeyAnyBits is an enum of RsaPrivKeys over all supported bit lengths. It is returned from RsaPrivKeyAnyBits::parse_from_der.

Variants

B2048(RsaPrivKey<B2048>)
B3072(RsaPrivKey<B3072>)
B4096(RsaPrivKey<B4096>)
B6144(RsaPrivKey<B6144>)
B8192(RsaPrivKey<B8192>)

Methods

impl RsaPrivKeyAnyBits[src]

#[must_use] pub fn public(&self) -> RsaPubKeyAnyBits[src]

Gets the public key corresponding to this private key.

#[must_use] pub fn parse_from_der(bytes: &[u8]) -> Result<RsaPrivKeyAnyBits, Error>[src]

Parses a private key in DER format with any bit length.

parse_from_der is like DerPrivateKey::parse_from_der, but it accepts any bit length rather that a particular bit length.

Since RsaPrivKey requires a static RsaKeyBits type parameter, the parse_from_der function on RsaPrivKey's DerPrivateKey implementation can only be called when the bit length is known ahead of time. This function, on the other hand, accepts any bit length.

Trait Implementations

impl Debug for RsaPrivKeyAnyBits[src]

Auto Trait Implementations

impl !Send for RsaPrivKeyAnyBits

impl Unpin for RsaPrivKeyAnyBits

impl !Sync for RsaPrivKeyAnyBits

impl RefUnwindSafe for RsaPrivKeyAnyBits

impl UnwindSafe for RsaPrivKeyAnyBits

Blanket Implementations

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

impl<T> From<T> for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

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

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

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