Trait min_jwt::sign::ring::RsaKey

source ·
pub trait RsaKey {
    type Signature: Signature;
    type Error;

    // Required method
    fn sign(
        &self,
        secure_random: &dyn SecureRandom,
        bytes: &[u8]
    ) -> Result<Self::Signature, Self::Error>;
}
Available on crate feature ring only.
Expand description

An RSA key.

Required Associated Types§

source

type Signature: Signature

Signature type returned.

source

type Error

Error type returned.

Required Methods§

source

fn sign( &self, secure_random: &dyn SecureRandom, bytes: &[u8] ) -> Result<Self::Signature, Self::Error>

Signs the bytes with the key.

Errors

Returns an underlying implementation error.

Implementations on Foreign Types§

source§

impl RsaKey for RsaKeyPair

§

type Signature = Vec<u8>

§

type Error = Unspecified

source§

fn sign( &self, secure_random: &dyn SecureRandom, bytes: &[u8] ) -> Result<Self::Signature, Self::Error>

source§

impl<T> RsaKey for &T
where T: RsaKey,

§

type Signature = <T as RsaKey>::Signature

§

type Error = <T as RsaKey>::Error

source§

fn sign( &self, secure_random: &dyn SecureRandom, bytes: &[u8] ) -> Result<Self::Signature, Self::Error>

Implementors§