Struct libp2p_identity::rsa::Keypair
source · pub struct Keypair(_);
Available on crate feature
rsa
and non-WebAssembly only.Expand description
An RSA keypair.
Implementations§
source§impl Keypair
impl Keypair
sourcepub fn from_pkcs8(der: &mut [u8]) -> Result<Keypair, DecodingError>
👎Deprecated since 0.2.0: Renamed to Keypair::try_decode_pkcs8
.
pub fn from_pkcs8(der: &mut [u8]) -> Result<Keypair, DecodingError>
Keypair::try_decode_pkcs8
.Decode an RSA keypair from a DER-encoded private key in PKCS#8 PrivateKeyInfo format (i.e. unencrypted) as defined in RFC5208.
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 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