Enum biscuit::jwa::SignatureAlgorithm [] [src]

pub enum SignatureAlgorithm {
    None,
    HS256,
    HS384,
    HS512,
    RS256,
    RS384,
    RS512,
    ES256,
    ES384,
    ES512,
    PS256,
    PS384,
    PS512,
}

The algorithms supported for digital signature and MACs, defined by RFC7518#3.

Variants

No encryption/signature is included for the JWT. During verification, the signature MUST BE empty or verification will fail.

HMAC using SHA-256

HMAC using SHA-384

HMAC using SHA-512

RSASSA-PKCS1-v1_5 using SHA-256

RSASSA-PKCS1-v1_5 using SHA-384

RSASSA-PKCS1-v1_5 using SHA-512

ECDSA using P-256 and SHA-256

ECDSA using P-384 and SHA-384

ECDSA using P-521 and SHA-512 -- This variant is unsupported and will probably never be.

RSASSA-PSS using SHA-256 and MGF1 with SHA-256. The size of the salt value is the same size as the hash function output.

RSASSA-PSS using SHA-384 and MGF1 with SHA-384 The size of the salt value is the same size as the hash function output.

RSASSA-PSS using SHA-512 and MGF1 with SHA-512 The size of the salt value is the same size as the hash function output.

Methods

impl SignatureAlgorithm
[src]

Take some bytes and sign it according to the algorithm and secret provided.

Verify signature based on the algorithm and secret provided.

Trait Implementations

impl Debug for SignatureAlgorithm
[src]

Formats the value using the given formatter.

impl Eq for SignatureAlgorithm
[src]

impl PartialEq for SignatureAlgorithm
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Copy for SignatureAlgorithm
[src]

impl Clone for SignatureAlgorithm
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Default for SignatureAlgorithm
[src]

Returns the "default value" for a type. Read more