Trait openidconnect::JwsSigningAlgorithm [−][src]
pub trait JwsSigningAlgorithm<JT>: Clone + Debug + DeserializeOwned + Eq + Hash + PartialEq + Serialize + 'static where
JT: JsonWebKeyType, { 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
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).
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.
fn 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.