Enum openid::biscuit::jwa::SignatureAlgorithm [−][src]
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.
Implementations
impl SignatureAlgorithm
[src]
pub fn sign(
self,
data: &[u8],
secret: &Secret
) -> Result<Vec<u8, Global>, Error>
[src]
self,
data: &[u8],
secret: &Secret
) -> Result<Vec<u8, Global>, Error>
Take some bytes and sign it according to the algorithm and secret provided.
pub fn verify(
self,
expected_signature: &[u8],
data: &[u8],
secret: &Secret
) -> Result<(), Error>
[src]
self,
expected_signature: &[u8],
data: &[u8],
secret: &Secret
) -> Result<(), Error>
Verify signature based on the algorithm and secret provided.
Trait Implementations
impl Clone for SignatureAlgorithm
[src]
pub fn clone(&self) -> SignatureAlgorithm
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for SignatureAlgorithm
[src]
impl Debug for SignatureAlgorithm
[src]
impl Default for SignatureAlgorithm
[src]
pub fn default() -> SignatureAlgorithm
[src]
impl<'de> Deserialize<'de> for SignatureAlgorithm
[src]
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<SignatureAlgorithm, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]
__deserializer: __D
) -> Result<SignatureAlgorithm, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
impl Eq for SignatureAlgorithm
[src]
impl PartialEq<SignatureAlgorithm> for SignatureAlgorithm
[src]
pub fn eq(&self, other: &SignatureAlgorithm) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl Serialize for SignatureAlgorithm
[src]
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
impl StructuralEq for SignatureAlgorithm
[src]
impl StructuralPartialEq for SignatureAlgorithm
[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,