Skip to main content

EncodePrivateKey

Trait EncodePrivateKey 

Source
pub trait EncodePrivateKey {
    // Required method
    fn to_pkcs8_der(&self) -> Result<SecretDocument, Error>;
}
Available on crate features alloc and pkcs8 only.
Expand description

Serialize a private key object to a PKCS#8 encoded document.

Required Methods§

Source

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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§