logo
pub struct RsaPrivateKeyDocument(_);
This is supported on crate feature alloc only.
Expand description

PKCS#1 RSA PRIVATE KEY document.

This type provides storage for RsaPrivateKey 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.

Trait Implementations

Performs the conversion.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize PKCS#1 private key from ASN.1 DER-encoded data (binary format). Read more

This is supported on crate feature pem only.

Deserialize PKCS#1-encoded private key from PEM. Read more

This is supported on crate feature std only.

Load PKCS#1 private key from an ASN.1 DER-encoded file on the local filesystem (binary format). Read more

This is supported on crate features pem and std only.

Load PKCS#1 private key from a PEM-encoded file on the local filesystem.

ASN.1 message type this document decodes to.

Does this type contain potentially sensitive data? Read more

Borrow the inner serialized bytes of this document.

Return an allocated ASN.1 DER serialization as a boxed slice.

Decode this document as ASN.1 DER.

Create a new document from the provided ASN.1 DER bytes.

Encode the provided type as ASN.1 DER.

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.

Write PEM-encoded ASN.1 DER document to a file.

This is supported on crate feature alloc only.

Serialize a RsaPrivateKeyDocument containing a PKCS#1-encoded private key.

This is supported on crate features alloc and pem only.

Serialize this private key as PEM-encoded PKCS#1 with the given LineEnding.

This is supported on crate features alloc and std only.

Write ASN.1 DER-encoded PKCS#1 private key to the given path.

This is supported on crate features pem and std and alloc only.

Write ASN.1 DER-encoded PKCS#1 private key to the given path.

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more

Expected PEM type label for a given document, e.g. "PRIVATE KEY"

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.