Trait ed25519::pkcs8::EncodePrivateKey
source · [−]pub trait EncodePrivateKey {
fn to_pkcs8_der(&self) -> Result<SecretDocument, Error>;
fn to_pkcs8_pem(
&self,
line_ending: LineEnding
) -> Result<Zeroizing<String>, Error> { ... }
}
Available on crate feature
pkcs8
only.Expand description
Serialize a private key object to a PKCS#8 encoded document.
Required Methods
fn 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.
Provided Methods
fn to_pkcs8_pem(
&self,
line_ending: LineEnding
) -> Result<Zeroizing<String>, Error>
fn to_pkcs8_pem(
&self,
line_ending: LineEnding
) -> Result<Zeroizing<String>, Error>
Serialize this private key as PEM-encoded PKCS#8 with the given LineEnding
.
Implementors
impl EncodePrivateKey for KeypairBytes
Available on crate feature
alloc
only.