diff --git a/Libraries/LibWeb/Crypto/CryptoAlgorithms.cpp b/Libraries/LibWeb/Crypto/CryptoAlgorithms.cpp index 589c92fc7c12..09ea7419bbd1 100644 --- a/Libraries/LibWeb/Crypto/CryptoAlgorithms.cpp +++ b/Libraries/LibWeb/Crypto/CryptoAlgorithms.cpp @@ -588,9 +588,9 @@ JS::ThrowCompletionOr> AesDerivedKeyParams::from_ return adopt_own(*new AesDerivedKeyParams { name, length }); } -EcdhKeyDerivePrams::~EcdhKeyDerivePrams() = default; +EcdhKeyDeriveParams::~EcdhKeyDeriveParams() = default; -JS::ThrowCompletionOr> EcdhKeyDerivePrams::from_value(JS::VM& vm, JS::Value value) +JS::ThrowCompletionOr> EcdhKeyDeriveParams::from_value(JS::VM& vm, JS::Value value) { auto& object = value.as_object(); @@ -606,7 +606,7 @@ JS::ThrowCompletionOr> EcdhKeyDerivePrams::from_v auto& key = verify_cast(*key_object); - return adopt_own(*new EcdhKeyDerivePrams { name, key }); + return adopt_own(*new EcdhKeyDeriveParams { name, key }); } EcKeyImportParams::~EcKeyImportParams() = default; @@ -2648,7 +2648,7 @@ WebIDL::ExceptionOr, GC::Ref>> ECDH::g WebIDL::ExceptionOr> ECDH::derive_bits(AlgorithmParams const& params, GC::Ref key, Optional length_optional) { auto& realm = *m_realm; - auto const& normalized_algorithm = static_cast(params); + auto const& normalized_algorithm = static_cast(params); // 1. If the [[type]] internal slot of key is not "private", then throw an InvalidAccessError. if (key->type() != Bindings::KeyType::Private) @@ -4121,7 +4121,7 @@ WebIDL::ExceptionOr> PBKDF2::import_key(AlgorithmParams const WebIDL::ExceptionOr> X25519::derive_bits(AlgorithmParams const& params, GC::Ref key, Optional length_optional) { auto& realm = *m_realm; - auto const& normalized_algorithm = static_cast(params); + auto const& normalized_algorithm = static_cast(params); // 1. If the [[type]] internal slot of key is not "private", then throw an InvalidAccessError. if (key->type() != Bindings::KeyType::Private) @@ -4620,7 +4620,7 @@ WebIDL::ExceptionOr> X448::derive_bits( return WebIDL::InvalidAccessError::create(m_realm, "Key is not a private key"_string); // 2. Let publicKey be the public member of normalizedAlgorithm. - auto& public_key = static_cast(params).public_key; + auto& public_key = static_cast(params).public_key; // 3. If the [[type]] internal slot of publicKey is not "public", then throw an InvalidAccessError. if (public_key->type() != Bindings::KeyType::Public) diff --git a/Libraries/LibWeb/Crypto/CryptoAlgorithms.h b/Libraries/LibWeb/Crypto/CryptoAlgorithms.h index 96f715ed58aa..5fbd25f49d55 100644 --- a/Libraries/LibWeb/Crypto/CryptoAlgorithms.h +++ b/Libraries/LibWeb/Crypto/CryptoAlgorithms.h @@ -577,10 +577,10 @@ class HMAC : public AlgorithmMethods { } }; -struct EcdhKeyDerivePrams : public AlgorithmParams { - virtual ~EcdhKeyDerivePrams() override; +struct EcdhKeyDeriveParams : public AlgorithmParams { + virtual ~EcdhKeyDeriveParams() override; - EcdhKeyDerivePrams(String name, CryptoKey& public_key) + EcdhKeyDeriveParams(String name, CryptoKey& public_key) : AlgorithmParams(move(name)) , public_key(public_key) { diff --git a/Libraries/LibWeb/Crypto/SubtleCrypto.cpp b/Libraries/LibWeb/Crypto/SubtleCrypto.cpp index de277d94493e..772976974f07 100644 --- a/Libraries/LibWeb/Crypto/SubtleCrypto.cpp +++ b/Libraries/LibWeb/Crypto/SubtleCrypto.cpp @@ -807,7 +807,7 @@ SupportedAlgorithmsMap const& supported_algorithms() // https://w3c.github.io/webcrypto/#ecdh-registration define_an_algorithm("importKey"_string, "ECDH"_string); define_an_algorithm("exportKey"_string, "ECDH"_string); - define_an_algorithm("deriveBits"_string, "ECDH"_string); + define_an_algorithm("deriveBits"_string, "ECDH"_string); define_an_algorithm("generateKey"_string, "ECDH"_string); // https://w3c.github.io/webcrypto/#aes-ctr-registration @@ -867,13 +867,13 @@ SupportedAlgorithmsMap const& supported_algorithms() define_an_algorithm("get key length"_string, "PBKDF2"_string); // https://wicg.github.io/webcrypto-secure-curves/#x25519-registration - define_an_algorithm("deriveBits"_string, "X25519"_string); + define_an_algorithm("deriveBits"_string, "X25519"_string); define_an_algorithm("generateKey"_string, "X25519"_string); define_an_algorithm("importKey"_string, "X25519"_string); define_an_algorithm("exportKey"_string, "X25519"_string); // https://wicg.github.io/webcrypto-secure-curves/#x448-registration - define_an_algorithm("deriveBits"_string, "X448"_string); + define_an_algorithm("deriveBits"_string, "X448"_string); define_an_algorithm("generateKey"_string, "X448"_string); define_an_algorithm("importKey"_string, "X448"_string); define_an_algorithm("exportKey"_string, "X448"_string);