Struct pkcs1::RsaPublicKeyDocument
source · [−]pub struct RsaPublicKeyDocument(_);
alloc
only.Expand description
PKCS#1 RSA PUBLIC KEY
document.
This type provides storage for RsaPublicKey
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
Deserialize object from ASN.1 DER-encoded [RsaPublicKey
]
(binary format). Read more
std
only.Load [RsaPublicKey
] from an ASN.1 DER-encoded file on the local
filesystem (binary format). Read more
pem
and std
only.Load [RsaPublicKey
] from a PEM-encoded file on the local filesystem.
type Message = RsaPublicKey<'a>
type Message = RsaPublicKey<'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.
alloc
only.Serialize a RsaPublicKeyDocument
containing a PKCS#1-encoded public key.
alloc
and pem
only.Serialize this public key as PEM-encoded PKCS#1 with the given line ending.
alloc
and std
only.Write ASN.1 DER-encoded public key to the given path.
fn write_pkcs1_pem_file(
&self,
path: impl AsRef<Path>,
line_ending: LineEnding
) -> Result<()>
fn write_pkcs1_pem_file(
&self,
path: impl AsRef<Path>,
line_ending: LineEnding
) -> Result<()>
pem
and std
and alloc
only.Write ASN.1 DER-encoded public key to the given path.
Expected PEM type label for a given document, e.g. "PRIVATE KEY"
Performs the conversion.
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for RsaPublicKeyDocument
impl Send for RsaPublicKeyDocument
impl Sync for RsaPublicKeyDocument
impl Unpin for RsaPublicKeyDocument
impl UnwindSafe for RsaPublicKeyDocument
Blanket Implementations
Mutably borrows from an owned value. Read more