Trait pkcs8::FromPublicKey [−][src]
Parse a public key object from an encoded SPKI document.
Required methods
fn from_spki(spki: SubjectPublicKeyInfo<'_>) -> Result<Self>
[src]
Parse SubjectPublicKeyInfo
into a public key object.
Provided methods
fn from_public_key_der(bytes: &[u8]) -> Result<Self>
[src]
Deserialize object from ASN.1 DER-encoded SubjectPublicKeyInfo
(binary format).
fn from_public_key_doc(doc: &PublicKeyDocument) -> Result<Self>
[src]
This is supported on crate feature
alloc
only.Deserialize PKCS#8 private key from a PrivateKeyDocument
.
fn from_public_key_pem(s: &str) -> Result<Self>
[src]
This is supported on crate feature
pem
only.Deserialize PEM-encoded SubjectPublicKeyInfo
.
Keys in this format begin with the following delimiter:
-----BEGIN PUBLIC KEY-----
fn read_public_key_der_file(path: impl AsRef<Path>) -> Result<Self>
[src]
This is supported on crate feature
std
only.Load public key object from an ASN.1 DER-encoded file on the local filesystem (binary format).
fn read_public_key_pem_file(path: impl AsRef<Path>) -> Result<Self>
[src]
This is supported on crate features
pem
and std
only.Load public key object from a PEM-encoded file on the local filesystem.