Struct pkcs8::EncryptedPrivateKeyDocument [−][src]
pub struct EncryptedPrivateKeyDocument(_);
alloc
and pkcs5
only.Expand description
Encrypted PKCS#8 private key document.
This type provides heap-backed storage for EncryptedPrivateKeyInfo
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
This is supported on crate feature encryption
only.
encryption
only.Attempt to decrypt this encrypted private key using the provided password to derive an encryption key.
Parse the EncryptedPrivateKeyInfo
contained in this EncryptedPrivateKeyDocument
.
Trait Implementations
type Message = EncryptedPrivateKeyInfo<'a>
type Message = EncryptedPrivateKeyInfo<'a>
ASN.1 message type this document decodes to.
Borrow the inner serialized bytes of this document.
Return an allocated ASN.1 DER serialization as a boxed slice.
Create a new document from the provided ASN.1 DER bytes.
Decode ASN.1 DER document from PEM.
Encode ASN.1 DER document as a PEM string.
Read ASN.1 DER document from a file.
Read PEM-encoded ASN.1 DER document from a file.
Write ASN.1 DER document to a file.
fn write_pem_file(
&self,
path: impl AsRef<Path>,
line_ending: LineEnding
) -> Result<(), Error> where
Self: PemLabel,
fn write_pem_file(
&self,
path: impl AsRef<Path>,
line_ending: LineEnding
) -> Result<(), Error> where
Self: PemLabel,
Write PEM-encoded ASN.1 DER document to a file.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Expected PEM type label for a given document, e.g. "PRIVATE KEY"
Performs the conversion.
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for EncryptedPrivateKeyDocument
impl Send for EncryptedPrivateKeyDocument
impl Sync for EncryptedPrivateKeyDocument
impl Unpin for EncryptedPrivateKeyDocument
impl UnwindSafe for EncryptedPrivateKeyDocument
Blanket Implementations
Mutably borrows from an owned value. Read more