Trait pkcs1::EncodeRsaPrivateKey
source · pub trait EncodeRsaPrivateKey {
// Required method
fn to_pkcs1_der(&self) -> Result<SecretDocument>;
// Provided method
fn to_pkcs1_pem(&self, line_ending: LineEnding) -> Result<Zeroizing<String>> { ... }
}
Expand description
Serialize a RsaPrivateKey
to a PKCS#1 encoded document.
Required Methods§
sourcefn to_pkcs1_der(&self) -> Result<SecretDocument>
fn to_pkcs1_der(&self) -> Result<SecretDocument>
Serialize a SecretDocument
containing a PKCS#1-encoded private key.
Provided Methods§
sourcefn to_pkcs1_pem(&self, line_ending: LineEnding) -> Result<Zeroizing<String>>
fn to_pkcs1_pem(&self, line_ending: LineEnding) -> Result<Zeroizing<String>>
Serialize this private key as PEM-encoded PKCS#1 with the given LineEnding
.