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

pub enum RsaPubKeyAnyBits {
    B2048(RsaPubKey<B2048>),
    B3072(RsaPubKey<B3072>),
    B4096(RsaPubKey<B4096>),
    B6144(RsaPubKey<B6144>),
    B8192(RsaPubKey<B8192>),
}

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

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

Variants

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

Methods

impl RsaPubKeyAnyBits[src]

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

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

parse_from_der is like DerPublicKey::parse_from_der, but it accepts any bit length rather than a particular bit length.

Since RsaPubKey requires a static RsaKeyBits type parameter, the parse_from_der function on RsaPubKey's DerPublicKey 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 RsaPubKeyAnyBits[src]

Auto Trait Implementations

impl !Send for RsaPubKeyAnyBits

impl Unpin for RsaPubKeyAnyBits

impl !Sync for RsaPubKeyAnyBits

impl RefUnwindSafe for RsaPubKeyAnyBits

impl UnwindSafe for RsaPubKeyAnyBits

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]