pub trait JoseAlgorithm {
    type Signature: SignatureEncoding;

    const IDENTIFIER: AlgorithmIdentifier;
}
Expand description

A trait to associate an alogritm identifier with an algorithm.

Algorithm identifiers are used in JWS and JWE to indicate how a token is signed or encrypted. They are set in the crate::jose::Header automatically when signing the JWT.

Required Associated Types§

source

type Signature: SignatureEncoding

The type of the signature, which must support encoding.

Required Associated Constants§

source

const IDENTIFIER: AlgorithmIdentifier

The identifier for this algorithm when used in a JWT registered header.

This is the alg field in the JOSE header.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl JoseAlgorithm for jaws::algorithms::ecdsa::SigningKey<NistP256>

source§

const IDENTIFIER: AlgorithmIdentifier = crate::algorithms::AlgorithmIdentifier::ES256

§

type Signature = Signature<NistP256>

source§

impl JoseAlgorithm for jaws::algorithms::ecdsa::SigningKey<NistP384>

source§

const IDENTIFIER: AlgorithmIdentifier = crate::algorithms::AlgorithmIdentifier::ES384

§

type Signature = Signature<NistP384>

source§

impl JoseAlgorithm for jaws::algorithms::ecdsa::VerifyingKey<NistP256>

source§

const IDENTIFIER: AlgorithmIdentifier = crate::algorithms::AlgorithmIdentifier::ES256

§

type Signature = Signature<NistP256>

source§

impl JoseAlgorithm for jaws::algorithms::ecdsa::VerifyingKey<NistP384>

source§

const IDENTIFIER: AlgorithmIdentifier = crate::algorithms::AlgorithmIdentifier::ES384

§

type Signature = Signature<NistP384>

source§

impl JoseAlgorithm for Hmac<Sha256>

source§

const IDENTIFIER: AlgorithmIdentifier = crate::algorithms::AlgorithmIdentifier::HS256

§

type Signature = DigestSignature<CoreWrapper<CtVariableCoreWrapper<Sha256VarCore, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, OidSha256>>>

source§

impl JoseAlgorithm for Hmac<Sha384>

source§

const IDENTIFIER: AlgorithmIdentifier = crate::algorithms::AlgorithmIdentifier::HS384

§

type Signature = DigestSignature<CoreWrapper<CtVariableCoreWrapper<Sha512VarCore, UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B1>, B0>, B0>, B0>, B0>, OidSha384>>>

source§

impl JoseAlgorithm for Hmac<Sha512>

source§

const IDENTIFIER: AlgorithmIdentifier = crate::algorithms::AlgorithmIdentifier::HS512

§

type Signature = DigestSignature<CoreWrapper<CtVariableCoreWrapper<Sha512VarCore, UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, OidSha512>>>

source§

impl JoseAlgorithm for jaws::algorithms::rsa::pkcs1v15::SigningKey<Sha256>

source§

const IDENTIFIER: AlgorithmIdentifier = crate::algorithms::AlgorithmIdentifier::RS256

§

type Signature = Signature

source§

impl JoseAlgorithm for jaws::algorithms::rsa::pkcs1v15::SigningKey<Sha384>

source§

const IDENTIFIER: AlgorithmIdentifier = crate::algorithms::AlgorithmIdentifier::RS384

§

type Signature = Signature

source§

impl JoseAlgorithm for jaws::algorithms::rsa::pkcs1v15::SigningKey<Sha512>

source§

const IDENTIFIER: AlgorithmIdentifier = crate::algorithms::AlgorithmIdentifier::RS512

§

type Signature = Signature

source§

impl JoseAlgorithm for jaws::algorithms::rsa::pkcs1v15::VerifyingKey<Sha256>

source§

const IDENTIFIER: AlgorithmIdentifier = crate::algorithms::AlgorithmIdentifier::RS256

§

type Signature = Signature

source§

impl JoseAlgorithm for jaws::algorithms::rsa::pkcs1v15::VerifyingKey<Sha384>

source§

const IDENTIFIER: AlgorithmIdentifier = crate::algorithms::AlgorithmIdentifier::RS384

§

type Signature = Signature

source§

impl JoseAlgorithm for jaws::algorithms::rsa::pkcs1v15::VerifyingKey<Sha512>

source§

const IDENTIFIER: AlgorithmIdentifier = crate::algorithms::AlgorithmIdentifier::RS512

§

type Signature = Signature

source§

impl JoseAlgorithm for BlindedSigningKey<Sha256>

source§

const IDENTIFIER: AlgorithmIdentifier = crate::algorithms::AlgorithmIdentifier::PS256

§

type Signature = Signature

source§

impl JoseAlgorithm for BlindedSigningKey<Sha384>

source§

const IDENTIFIER: AlgorithmIdentifier = crate::algorithms::AlgorithmIdentifier::PS384

§

type Signature = Signature

source§

impl JoseAlgorithm for BlindedSigningKey<Sha512>

source§

const IDENTIFIER: AlgorithmIdentifier = crate::algorithms::AlgorithmIdentifier::PS512

§

type Signature = Signature

source§

impl JoseAlgorithm for jaws::algorithms::rsa::pss::VerifyingKey<Sha256>

source§

const IDENTIFIER: AlgorithmIdentifier = crate::algorithms::AlgorithmIdentifier::PS256

§

type Signature = Signature

source§

impl JoseAlgorithm for jaws::algorithms::rsa::pss::VerifyingKey<Sha384>

source§

const IDENTIFIER: AlgorithmIdentifier = crate::algorithms::AlgorithmIdentifier::PS384

§

type Signature = Signature

source§

impl JoseAlgorithm for jaws::algorithms::rsa::pss::VerifyingKey<Sha512>

source§

const IDENTIFIER: AlgorithmIdentifier = crate::algorithms::AlgorithmIdentifier::PS512

§

type Signature = Signature