LibCrypto+LibWeb: De-templetize RSA and EC key types

There is no need to have `RSAPrivateKey`, `RSAPublicKey`, `ECPrivateKey`
and `ECPublicKey` to be templatize to utilize different implementation
of numbers.
This commit is contained in:
devgianlu 2025-05-31 19:06:51 +02:00 committed by Shannon Booth
commit 289f2b24bf
Notes: github-actions[bot] 2025-06-25 00:23:30 +00:00
9 changed files with 113 additions and 122 deletions

View file

@ -25,7 +25,7 @@ class CryptoKey final
GC_DECLARE_ALLOCATOR(CryptoKey);
public:
using InternalKeyData = Variant<ByteBuffer, Bindings::JsonWebKey, ::Crypto::PK::RSAPublicKey<>, ::Crypto::PK::RSAPrivateKey<>, ::Crypto::PK::ECPublicKey<>, ::Crypto::PK::ECPrivateKey<>>;
using InternalKeyData = Variant<ByteBuffer, Bindings::JsonWebKey, ::Crypto::PK::RSAPublicKey, ::Crypto::PK::RSAPrivateKey, ::Crypto::PK::ECPublicKey, ::Crypto::PK::ECPrivateKey>;
[[nodiscard]] static GC::Ref<CryptoKey> create(JS::Realm&, InternalKeyData);
[[nodiscard]] static GC::Ref<CryptoKey> create(JS::Realm&);