Struct pkcs8::PrivateKeyDocument
source · [−]pub struct PrivateKeyDocument(_);
Expand description
PKCS#8 private key document.
This type provides storage for PrivateKeyInfo
encoded as ASN.1 DER
with the invariant that the contained-document is “well-formed”, i.e. it
will parse successfully according to this crate’s parsing rules.
Implementations
sourceimpl PrivateKeyDocument
impl PrivateKeyDocument
sourcepub fn private_key_info(&self) -> PrivateKeyInfo<'_>
pub fn private_key_info(&self) -> PrivateKeyInfo<'_>
Parse the PrivateKeyInfo
contained in this PrivateKeyDocument
sourcepub fn from_der(bytes: &[u8]) -> Result<Self>
pub fn from_der(bytes: &[u8]) -> Result<Self>
Parse PrivateKeyDocument
from ASN.1 DER-encoded PKCS#8
Trait Implementations
sourceimpl AsRef<[u8]> for PrivateKeyDocument
impl AsRef<[u8]> for PrivateKeyDocument
sourceimpl Clone for PrivateKeyDocument
impl Clone for PrivateKeyDocument
sourcefn clone(&self) -> PrivateKeyDocument
fn clone(&self) -> PrivateKeyDocument
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for PrivateKeyDocument
impl Debug for PrivateKeyDocument
sourceimpl From<&PrivateKeyInfo<'_>> for PrivateKeyDocument
impl From<&PrivateKeyInfo<'_>> for PrivateKeyDocument
sourcefn from(private_key_info: &PrivateKeyInfo<'_>) -> PrivateKeyDocument
fn from(private_key_info: &PrivateKeyInfo<'_>) -> PrivateKeyDocument
Converts to this type from the input type.
sourceimpl From<PrivateKeyInfo<'_>> for PrivateKeyDocument
impl From<PrivateKeyInfo<'_>> for PrivateKeyDocument
sourcefn from(private_key_info: PrivateKeyInfo<'_>) -> PrivateKeyDocument
fn from(private_key_info: PrivateKeyInfo<'_>) -> PrivateKeyDocument
Converts to this type from the input type.
sourceimpl TryFrom<&[u8]> for PrivateKeyDocument
impl TryFrom<&[u8]> for PrivateKeyDocument
Auto Trait Implementations
impl RefUnwindSafe for PrivateKeyDocument
impl Send for PrivateKeyDocument
impl Sync for PrivateKeyDocument
impl Unpin for PrivateKeyDocument
impl UnwindSafe for PrivateKeyDocument
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more