LibWeb: Add the CryptoKey interface

This commit is contained in:
stelar7 2023-12-15 20:25:35 +01:00 committed by Andrew Kaster
commit a8ddf6c2a4
Notes: sideshowbarker 2024-07-17 11:30:05 +09:00
7 changed files with 104 additions and 0 deletions

View file

@ -0,0 +1,12 @@
enum KeyType { "public", "private", "secret" };
enum KeyUsage { "encrypt", "decrypt", "sign", "verify", "deriveKey", "deriveBits", "wrapKey", "unwrapKey" };
// https://w3c.github.io/webcrypto/#cryptokey-interface
[SecureContext,Exposed=(Window,Worker),Serializable]
interface CryptoKey {
readonly attribute KeyType type;
readonly attribute boolean extractable;
readonly attribute object algorithm;
readonly attribute object usages;
};