Skip to content

Commit

Permalink
LibWeb: Make SubtleCrypto use the correct algorithm name for SHA-1
Browse files Browse the repository at this point in the history
The spec defines "SHA-1" as a recognized algorithm name, not "SHA1".

This makes SHA-1 hash values show up on string.248.no.
  • Loading branch information
rosvik authored and awesomekling committed Mar 3, 2024
1 parent d5e74b1 commit d89e617
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Userland/Libraries/LibWeb/Crypto/SubtleCrypto.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ SubtleCrypto::SupportedAlgorithmsMap SubtleCrypto::supported_algorithms()

// https://w3c.github.io/webcrypto/#algorithm-conventions
// https://w3c.github.io/webcrypto/#sha
define_an_algorithm("digest"_string, "SHA1"_string, ""_string);
define_an_algorithm("digest"_string, "SHA-1"_string, ""_string);
define_an_algorithm("digest"_string, "SHA-256"_string, ""_string);
define_an_algorithm("digest"_string, "SHA-384"_string, ""_string);
define_an_algorithm("digest"_string, "SHA-512"_string, ""_string);
Expand Down

0 comments on commit d89e617

Please sign in to comment.