pub enum RsaPubKeyAnyBits {
B2048(RsaPubKey<B2048>),
B3072(RsaPubKey<B3072>),
B4096(RsaPubKey<B4096>),
B6144(RsaPubKey<B6144>),
B8192(RsaPubKey<B8192>),
}Expand description
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>)
Implementations§
Source§impl RsaPubKeyAnyBits
impl RsaPubKeyAnyBits
Sourcepub fn parse_from_der(bytes: &[u8]) -> Result<RsaPubKeyAnyBits, Error>
pub fn parse_from_der(bytes: &[u8]) -> Result<RsaPubKeyAnyBits, Error>
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§
Auto Trait Implementations§
impl Freeze for RsaPubKeyAnyBits
impl RefUnwindSafe for RsaPubKeyAnyBits
impl !Send for RsaPubKeyAnyBits
impl !Sync for RsaPubKeyAnyBits
impl Unpin for RsaPubKeyAnyBits
impl UnwindSafe for RsaPubKeyAnyBits
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