LibWeb: Implement skeleton of SubtleCrypto.encrypt

No algorithms implement this yet, but this is the high level entry
point.
This commit is contained in:
Andrew Kaster 2024-03-14 22:39:48 -06:00 committed by Andrew Kaster
commit df3d0538a9
Notes: sideshowbarker 2024-07-17 05:41:34 +09:00
6 changed files with 76 additions and 1 deletions

View file

@ -106,6 +106,11 @@ class AlgorithmMethods {
public:
virtual ~AlgorithmMethods();
virtual WebIDL::ExceptionOr<JS::NonnullGCPtr<JS::ArrayBuffer>> encrypt(AlgorithmParams const&, JS::NonnullGCPtr<CryptoKey>, ByteBuffer const&)
{
return WebIDL::NotSupportedError::create(m_realm, "encrypt is not supported"_fly_string);
}
virtual WebIDL::ExceptionOr<JS::NonnullGCPtr<JS::ArrayBuffer>> digest(AlgorithmParams const&, ByteBuffer const&)
{
return WebIDL::NotSupportedError::create(m_realm, "digest is not supported"_fly_string);