Trait rsa::PublicKeyEncoding[][src]

pub trait PublicKeyEncoding: PublicKey {
    fn to_pkcs1(&self) -> Result<Vec<u8>> { ... }
fn to_pkcs8(&self) -> Result<Vec<u8>> { ... } }

Provided methods

Encodes a Public key to into PKCS1 bytes.

This data will be base64 encoded which would be used following a -----BEGIN <name> PUBLIC KEY----- header.

https://tls.mbed.org/kb/cryptography/asn1-key-structures-in-der-and-pem

Encodes a Public key to into PKCS8 bytes.

This data will be base64 encoded which would be used following a -----BEGIN PUBLIC KEY----- header.

https://tls.mbed.org/kb/cryptography/asn1-key-structures-in-der-and-pem

Implementors