pub struct Keypair(/* private fields */);
Available on crate feature
rsa
and non-WebAssembly only.Expand description
An RSA keypair.
Implementations§
Source§impl Keypair
impl Keypair
Sourcepub fn try_decode_pkcs1(der: &mut [u8]) -> Result<Keypair, DecodingError>
pub fn try_decode_pkcs1(der: &mut [u8]) -> Result<Keypair, DecodingError>
Decode an RSA keypair from a DER-encoded private key in PKCS#1 RSAPrivateKey format (i.e. unencrypted) as defined in RFC3447.
Sourcepub fn try_decode_pkcs8(der: &mut [u8]) -> Result<Keypair, DecodingError>
pub fn try_decode_pkcs8(der: &mut [u8]) -> Result<Keypair, DecodingError>
Decode an RSA keypair from a DER-encoded private key in PKCS#8 PrivateKeyInfo format (i.e. unencrypted) as defined in RFC5208.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Keypair
impl RefUnwindSafe for Keypair
impl Send for Keypair
impl Sync for Keypair
impl Unpin for Keypair
impl UnwindSafe for Keypair
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