LibWeb: Implement SubtleCrypto.generateKey skeleton

We don't have any algorithms defined that actually support generateKey,
but now all the scaffolding is there.
This commit is contained in:
Andrew Kaster 2024-03-06 19:15:03 -07:00 committed by Andrew Kaster
parent 810be6af07
commit 0b4858e589
Notes: sideshowbarker 2024-07-17 06:35:23 +09:00
4 changed files with 68 additions and 2 deletions

View file

@ -53,6 +53,11 @@ public:
return WebIDL::NotSupportedError::create(m_realm, "importKey is not supported"_fly_string);
}
virtual WebIDL::ExceptionOr<Variant<JS::NonnullGCPtr<CryptoKey>, JS::NonnullGCPtr<CryptoKeyPair>>> generate_key(AlgorithmParams const&, bool, Vector<Bindings::KeyUsage> const&)
{
return WebIDL::NotSupportedError::create(m_realm, "generateKey is not supported"_fly_string);
}
static NonnullOwnPtr<AlgorithmMethods> create(JS::Realm& realm) { return adopt_own(*new AlgorithmMethods(realm)); }
protected: