Skip to main content

Encode

Trait Encode 

Source
pub trait Encode: Sealed {
    // Required methods
    fn as_pkcs1(&self) -> Result<Vec<u8>, Error>;
    fn as_pkcs8(&self) -> Result<Vec<u8>, Error>;
}
Expand description

Trait for encoding the keys

Required Methods§

Source

fn as_pkcs1(&self) -> Result<Vec<u8>, Error>

Encode in the PKCS#1 format

Source

fn as_pkcs8(&self) -> Result<Vec<u8>, Error>

Encode in the PKCS#8 format

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Encode for RSAPrivateKey

Source§

impl Encode for RSAPublicKey

Implementors§