Trait min_jwt::sign::ring::HmacKey

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

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

An Hmac key.

Required Associated Types§

source

type Signature: Signature

Signature type returned.

source

type Error

Error type returned.

Required Methods§

source

fn sign(&self, 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 HmacKey for Key

§

type Signature = Tag

§

type Error = ()

source§

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

source§

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

§

type Signature = <T as HmacKey>::Signature

§

type Error = <T as HmacKey>::Error

source§

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

Implementors§