Skip to content

Commit

Permalink
Simplify hash_bytes() implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
ramosbugs committed Oct 12, 2023
1 parent 3b0037e commit bf49dbe
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/core/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -922,12 +922,8 @@ impl JwsSigningAlgorithm<CoreJsonWebKeyType> for CoreJwsSigningAlgorithm {
CoreJwsSigningAlgorithm::HmacSha512
| CoreJwsSigningAlgorithm::RsaSsaPkcs1V15Sha512
| CoreJwsSigningAlgorithm::RsaSsaPssSha512
| CoreJwsSigningAlgorithm::EcdsaP521Sha512 => {
let mut hasher = Sha512::new();
hasher.update(bytes);
hasher.finalize().to_vec()
}
CoreJwsSigningAlgorithm::EdDsaEd25519 => {
| CoreJwsSigningAlgorithm::EcdsaP521Sha512
| CoreJwsSigningAlgorithm::EdDsaEd25519 => {
let mut hasher = Sha512::new();
hasher.update(bytes);
hasher.finalize().to_vec()
Expand Down

0 comments on commit bf49dbe

Please sign in to comment.