pub struct PrivateKey { /* private fields */ }Expand description
PKCS#8 private key wrapper
Implementations§
Source§impl PrivateKey
impl PrivateKey
Sourcepub fn from_der(data: &[u8]) -> Result<Self>
pub fn from_der(data: &[u8]) -> Result<Self>
Parses a PKCS#8 private key encoded in DER format and constructs a new instance of the struct.
Sourcepub fn as_der(&self) -> &[u8] ⓘ
pub fn as_der(&self) -> &[u8] ⓘ
Returns a reference to the private key data in PKCS#8 DER-encoded format.
Sourcepub fn oid(&self) -> ObjectIdentifier
pub fn oid(&self) -> ObjectIdentifier
Returns an ObjectIdentifier of the key algorithm.
Trait Implementations§
Source§impl Clone for PrivateKey
impl Clone for PrivateKey
Source§fn clone(&self) -> PrivateKey
fn clone(&self) -> PrivateKey
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PrivateKey
impl Debug for PrivateKey
impl Eq for PrivateKey
Source§impl PartialEq for PrivateKey
impl PartialEq for PrivateKey
Source§fn eq(&self, other: &PrivateKey) -> bool
fn eq(&self, other: &PrivateKey) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PrivateKey
Auto Trait Implementations§
impl Freeze for PrivateKey
impl RefUnwindSafe for PrivateKey
impl Send for PrivateKey
impl Sync for PrivateKey
impl Unpin for PrivateKey
impl UnsafeUnpin for PrivateKey
impl UnwindSafe for PrivateKey
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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