Enum biscuit::jwa::SignatureAlgorithm
source · pub enum SignatureAlgorithm {
Show 13 variants
None,
HS256,
HS384,
HS512,
RS256,
RS384,
RS512,
ES256,
ES384,
ES512,
PS256,
PS384,
PS512,
}
Expand description
The algorithms supported for digital signature and MACs, defined by RFC7518#3.
Variants
None
No encryption/signature is included for the JWT. During verification, the signature MUST BE empty or verification will fail.
HS256
HMAC using SHA-256
HS384
HMAC using SHA-384
HS512
HMAC using SHA-512
RS256
RSASSA-PKCS1-v1_5 using SHA-256
RS384
RSASSA-PKCS1-v1_5 using SHA-384
RS512
RSASSA-PKCS1-v1_5 using SHA-512
ES256
ECDSA using P-256 and SHA-256
ES384
ECDSA using P-384 and SHA-384
ES512
ECDSA using P-521 and SHA-512 – This variant is unsupported and will probably never be.
PS256
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.
PS384
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.
PS512
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.
Implementations
Trait Implementations
sourceimpl Clone for SignatureAlgorithm
impl Clone for SignatureAlgorithm
sourcefn clone(&self) -> SignatureAlgorithm
fn clone(&self) -> SignatureAlgorithm
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for SignatureAlgorithm
impl Debug for SignatureAlgorithm
sourceimpl Default for SignatureAlgorithm
impl Default for SignatureAlgorithm
sourceimpl<'de> Deserialize<'de> for SignatureAlgorithm
impl<'de> Deserialize<'de> for SignatureAlgorithm
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
sourceimpl PartialEq<SignatureAlgorithm> for SignatureAlgorithm
impl PartialEq<SignatureAlgorithm> for SignatureAlgorithm
sourcefn eq(&self, other: &SignatureAlgorithm) -> bool
fn eq(&self, other: &SignatureAlgorithm) -> bool
sourceimpl Serialize for SignatureAlgorithm
impl Serialize for SignatureAlgorithm
impl Copy for SignatureAlgorithm
impl Eq for SignatureAlgorithm
impl StructuralEq for SignatureAlgorithm
impl StructuralPartialEq for SignatureAlgorithm
Auto Trait Implementations
impl RefUnwindSafe for SignatureAlgorithm
impl Send for SignatureAlgorithm
impl Sync for SignatureAlgorithm
impl Unpin for SignatureAlgorithm
impl UnwindSafe for SignatureAlgorithm
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.