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

@ -44,6 +44,7 @@ public:
void set_usages(Vector<Bindings::KeyUsage>);
InternalKeyData const& handle() const { return m_key_data; }
String algorithm_name() const;
virtual StringView interface_name() const override { return "CryptoKey"sv; }
virtual WebIDL::ExceptionOr<void> serialization_steps(HTML::SerializationRecord& record, bool for_storage, HTML::SerializationMemory&) override;
@ -63,6 +64,7 @@ private:
Vector<Bindings::KeyUsage> m_key_usages;
InternalKeyData m_key_data; // [[handle]]
mutable String m_algorithm_name;
};
// https://w3c.github.io/webcrypto/#ref-for-dfn-CryptoKeyPair-2