pub trait EncodePrivateKey {
// Required method
fn to_pkcs8_der(&self) -> Result<SecretDocument, Error>;
}Available on crate features
pkcs8 and alloc only.Expand description
Serialize a private key object to a PKCS#8 encoded document.
Required Methods§
Sourcefn to_pkcs8_der(&self) -> Result<SecretDocument, Error>
fn to_pkcs8_der(&self) -> Result<SecretDocument, Error>
Serialize a SecretDocument containing a PKCS#8-encoded private key.
§Errors
Returns format-specific errors in the event the document failed to serialize.