Trait pkcs8::ToPublicKey [−][src]
pub trait ToPublicKey { fn to_public_key_der(&self) -> Result<PublicKeyDocument>; fn to_public_key_pem(&self) -> Result<String> { ... } fn write_public_key_der_file(&self, path: impl AsRef<Path>) -> Result<()> { ... } fn write_public_key_pem_file(&self, path: impl AsRef<Path>) -> Result<()> { ... } }
This is supported on crate feature
alloc
only.Expand description
Serialize a public key object to a SPKI-encoded document.
Required methods
fn to_public_key_der(&self) -> Result<PublicKeyDocument>
[src]
fn to_public_key_der(&self) -> Result<PublicKeyDocument>
[src]Serialize a PublicKeyDocument
containing a SPKI-encoded public key.
Provided methods
fn to_public_key_pem(&self) -> Result<String>
[src]
fn to_public_key_pem(&self) -> Result<String>
[src]This is supported on crate feature
pem
only.Serialize this public key as PEM-encoded SPKI.
This is supported on crate feature
std
only.Write ASN.1 DER-encoded public key to the given path