[][src]Trait pkcs8::FromPublicKey

pub trait FromPublicKey: Sized {
    pub fn from_spki(spki: SubjectPublicKeyInfo<'_>) -> Result<Self>;

    pub fn from_public_key_der(bytes: &[u8]) -> Result<Self> { ... }
pub fn from_public_key_doc(doc: &PublicKeyDocument) -> Result<Self> { ... }
pub fn from_public_key_pem(s: &str) -> Result<Self> { ... }
pub fn read_public_key_der_file(path: impl AsRef<Path>) -> Result<Self> { ... }
pub fn read_public_key_pem_file(path: impl AsRef<Path>) -> Result<Self> { ... } }

Parse a public key object from an encoded SPKI document.

Required methods

pub fn from_spki(spki: SubjectPublicKeyInfo<'_>) -> Result<Self>[src]

Parse SubjectPublicKeyInfo into a public key object.

Loading content...

Provided methods

pub fn from_public_key_der(bytes: &[u8]) -> Result<Self>[src]

Deserialize object from ASN.1 DER-encoded SubjectPublicKeyInfo (binary format).

pub 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.

pub 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-----

pub 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).

pub 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.

Loading content...

Implementors

Loading content...