pub struct PrivateKey(/* private fields */);Expand description
An RSA private key.
Implementations§
Source§impl PrivateKey
impl PrivateKey
Sourcepub fn from_der_rsa_private_key(der: &[u8]) -> Option<Self>
pub fn from_der_rsa_private_key(der: &[u8]) -> Option<Self>
Parse a DER-encoded RSAPrivateKey structure (from RFC 8017).
Sourcepub fn to_der_rsa_private_key(&self) -> Buffer
pub fn to_der_rsa_private_key(&self) -> Buffer
Serialize to a DER-encoded RSAPrivateKey structure (from RFC 8017).
Sourcepub fn from_der_private_key_info(der: &[u8]) -> Option<Self>
pub fn from_der_private_key_info(der: &[u8]) -> Option<Self>
Parse a DER-encrypted PrivateKeyInfo struct (from RFC 5208). This is often called “PKCS#8 format”.
Sourcepub fn to_der_private_key_info(&self) -> Buffer
pub fn to_der_private_key_info(&self) -> Buffer
Serialize to a DER-encrypted PrivateKeyInfo struct (from RFC 5208). This is often called “PKCS#8 format”.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PrivateKey
impl RefUnwindSafe for PrivateKey
impl Unpin for PrivateKey
impl UnsafeUnpin for PrivateKey
impl UnwindSafe for PrivateKey
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