From d89e617a42763361a12e6fd995ad481119260e22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20R=C3=B8svik?= Date: Sat, 2 Mar 2024 15:38:49 +0100 Subject: [PATCH] LibWeb: Make SubtleCrypto use the correct algorithm name for SHA-1 The spec defines "SHA-1" as a recognized algorithm name, not "SHA1". This makes SHA-1 hash values show up on string.248.no. --- Userland/Libraries/LibWeb/Crypto/SubtleCrypto.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/Crypto/SubtleCrypto.cpp b/Userland/Libraries/LibWeb/Crypto/SubtleCrypto.cpp index 7f726ba0bc..edc2ddef39 100644 --- a/Userland/Libraries/LibWeb/Crypto/SubtleCrypto.cpp +++ b/Userland/Libraries/LibWeb/Crypto/SubtleCrypto.cpp @@ -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);