LibWeb: Implement encapsulateKey method for SubtleCrypto

None of the current algorithms supports the method but the future
post quantum algorithms will do so.
This commit is contained in:
Tete17 2025-11-27 19:16:27 +01:00 committed by Jelle Raaijmakers
parent 42f55c7c97
commit b36a702ad1
Notes: github-actions[bot] 2025-11-27 20:51:16 +00:00
4 changed files with 108 additions and 0 deletions

View file

@ -377,6 +377,11 @@ public:
return WebIDL::NotSupportedError::create(m_realm, "unwwrapKey is not supported"_utf16);
}
virtual WebIDL::ExceptionOr<GC::Ref<EncapsulatedBits>> encapsulate(AlgorithmParams const&, GC::Ref<CryptoKey>)
{
return WebIDL::NotSupportedError::create(m_realm, "encapsulate is not supported"_utf16);
}
static NonnullOwnPtr<AlgorithmMethods> create(JS::Realm& realm) { return adopt_own(*new AlgorithmMethods(realm)); }
protected: