pub trait JwsSigningAlgorithm<JT>:
Clone
+ Debug
+ DeserializeOwned
+ Eq
+ Hash
+ PartialEq
+ Serialize
+ 'staticwhere
JT: JsonWebKeyType,{
// Required methods
fn key_type(&self) -> Option<JT>;
fn uses_shared_secret(&self) -> bool;
fn hash_bytes(&self, bytes: &[u8]) -> Result<Vec<u8>, String>;
fn rsa_sha_256() -> Self;
}Expand description
JSON Web Signature (JWS) algorithm.
Required Methods§
Sourcefn key_type(&self) -> Option<JT>
fn key_type(&self) -> Option<JT>
Returns the type of key required to use this signature algorithm, or None if this
algorithm does not require a key.
Returns true if the signature algorithm uses a shared secret (symmetric key).
Sourcefn hash_bytes(&self, bytes: &[u8]) -> Result<Vec<u8>, String>
fn hash_bytes(&self, bytes: &[u8]) -> Result<Vec<u8>, String>
Hashes the given bytes using the hash algorithm associated with this signing
algorithm, and returns the hashed bytes.
If hashing fails or this signing algorithm does not have an associated hash function, an
Err is returned with a string describing the cause of the error.
Sourcefn rsa_sha_256() -> Self
fn rsa_sha_256() -> Self
Returns the RS256 algorithm.
This is the default algorithm for OpenID Connect ID tokens and must be supported by all implementations.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".