[][src]Struct jwt_compact::alg::Es256k

pub struct Es256k<D = Sha256> { /* fields omitted */ }

Algorithm implementing elliptic curve digital signatures (ECDSA) on the secp256k1 curve.

The algorithm does not fix the choice of the message digest algorithm; instead, it is provided as a type parameter. SHA-256 is the default parameter value, but it can be set to any cryptographically secure hash function with 32-byte output (e.g., SHA3-256).

This type is available if the crate is built with the secp256k1 feature.

Methods

impl<D> Es256k<D> where
    D: Digest<OutputSize = U32> + Default
[src]

pub fn new(context: Secp256k1<All>) -> Self[src]

Creates a new algorithm instance. This is a (moderately) expensive operation, so if necessary, the algorithm should be clone()d rather than created anew.

Trait Implementations

impl<D> Algorithm for Es256k<D> where
    D: Digest<OutputSize = U32> + Default
[src]

type SigningKey = SecretKey

Key used when issuing new tokens.

type VerifyingKey = PublicKey

Key used when verifying tokens. May coincide with SigningKey for symmetric algorithms (e.g., HS*). Read more

type Signature = Signature

Signature produced by the algorithm.

impl<D> Default for Es256k<D> where
    D: Digest<OutputSize = U32> + Default
[src]

impl<D: Debug> Debug for Es256k<D>[src]

Auto Trait Implementations

impl<D> Send for Es256k<D> where
    D: Send

impl<D> Unpin for Es256k<D> where
    D: Unpin

impl<D> Sync for Es256k<D> where
    D: Sync

impl<D> UnwindSafe for Es256k<D> where
    D: UnwindSafe

impl<D> RefUnwindSafe for Es256k<D> where
    D: RefUnwindSafe

Blanket Implementations

impl<A> AlgorithmExt for A where
    A: Algorithm
[src]

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

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

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<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Clear for T where
    T: InitializableFromZeroed + ?Sized
[src]

impl<T> InitializableFromZeroed for T where
    T: Default
[src]