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