[][src]Struct rsa_export::RsaKey

pub struct RsaKey<T: Encode> { /* fields omitted */ }

Wrapper struct for the RSA key

Implementations

impl<T: Encode> RsaKey<T>[src]

pub fn new(key: T) -> Self[src]

Create a new wrapper, wrapping around the given key

pub fn into_inner(self) -> T[src]

Get the key which the wrapper is wrapping around

pub fn as_pkcs1(&self) -> Result<Vec<u8>, Box<dyn Error>>[src]

Encode the key in the PKCS#1 format

pub fn as_pkcs8(&self) -> Result<Vec<u8>, Box<dyn Error>>[src]

Encode the key in the PKCS#8 format

impl RsaKey<RSAPrivateKey>[src]

pub fn as_pkcs1_pem(&self) -> Result<String, Box<dyn Error>>[src]

Encode the key in the PKCS#1 format inside a PEM block

pub fn as_pkcs8_pem(&self) -> Result<String, Box<dyn Error>>[src]

Encode the key in the PKCS#8 format inside a PEM block

impl RsaKey<RSAPublicKey>[src]

pub fn as_pkcs1_pem(&self) -> Result<String, Box<dyn Error>>[src]

Encode the key in the PKCS#1 format inside a PEM block

pub fn as_pkcs8_pem(&self) -> Result<String, Box<dyn Error>>[src]

Encode the key in the PKCS#8 format inside a PEM block

impl RsaKey<RSAPrivateKey>[src]

pub fn public_key(&self) -> RsaKey<RSAPublicKey>[src]

Convenience function to create the public key version

Auto Trait Implementations

impl<T> RefUnwindSafe for RsaKey<T> where
    T: RefUnwindSafe

impl<T> Send for RsaKey<T> where
    T: Send

impl<T> Sync for RsaKey<T> where
    T: Sync

impl<T> Unpin for RsaKey<T> where
    T: Unpin

impl<T> UnwindSafe for RsaKey<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,