Trait pkcs1::ToRsaPrivateKey[][src]

pub trait ToRsaPrivateKey {
    fn to_pkcs1_der(&self) -> Result<RsaPrivateKeyDocument>;

    fn to_pkcs1_pem(&self) -> Result<Zeroizing<String>> { ... }
fn to_pkcs1_pem_with_le(
        &self,
        line_ending: LineEnding
    ) -> Result<Zeroizing<String>> { ... }
fn write_pkcs1_der_file(&self, path: &Path) -> Result<()> { ... }
fn write_pkcs1_pem_file(&self, path: &Path) -> Result<()> { ... } }
This is supported on crate feature alloc only.
Expand description

Serialize a RsaPrivateKey to a PKCS#1 encoded document.

Required methods

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

Provided methods

This is supported on crate feature pem only.

Serialize this private key as PEM-encoded PKCS#1.

This is supported on crate feature pem only.

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

This is supported on crate feature std only.

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

This is supported on crate features pem and std only.

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

Implementors