11cb0ef41Sopenharmony_ci// GENERATED CONTENT - DO NOT EDIT 21cb0ef41Sopenharmony_ci// Content was automatically extracted by Reffy into webref 31cb0ef41Sopenharmony_ci// (https://github.com/w3c/webref) 41cb0ef41Sopenharmony_ci// Source: Web Cryptography API (https://w3c.github.io/webcrypto/) 51cb0ef41Sopenharmony_ci 61cb0ef41Sopenharmony_cipartial interface mixin WindowOrWorkerGlobalScope { 71cb0ef41Sopenharmony_ci [SameObject] readonly attribute Crypto crypto; 81cb0ef41Sopenharmony_ci}; 91cb0ef41Sopenharmony_ci 101cb0ef41Sopenharmony_ci[Exposed=(Window,Worker)] 111cb0ef41Sopenharmony_ciinterface Crypto { 121cb0ef41Sopenharmony_ci [SecureContext] readonly attribute SubtleCrypto subtle; 131cb0ef41Sopenharmony_ci ArrayBufferView getRandomValues(ArrayBufferView array); 141cb0ef41Sopenharmony_ci}; 151cb0ef41Sopenharmony_ci 161cb0ef41Sopenharmony_citypedef (object or DOMString) AlgorithmIdentifier; 171cb0ef41Sopenharmony_ci 181cb0ef41Sopenharmony_citypedef AlgorithmIdentifier HashAlgorithmIdentifier; 191cb0ef41Sopenharmony_ci 201cb0ef41Sopenharmony_cidictionary Algorithm { 211cb0ef41Sopenharmony_ci required DOMString name; 221cb0ef41Sopenharmony_ci}; 231cb0ef41Sopenharmony_ci 241cb0ef41Sopenharmony_cidictionary KeyAlgorithm { 251cb0ef41Sopenharmony_ci required DOMString name; 261cb0ef41Sopenharmony_ci}; 271cb0ef41Sopenharmony_ci 281cb0ef41Sopenharmony_cienum KeyType { "public", "private", "secret" }; 291cb0ef41Sopenharmony_ci 301cb0ef41Sopenharmony_cienum KeyUsage { "encrypt", "decrypt", "sign", "verify", "deriveKey", "deriveBits", "wrapKey", "unwrapKey" }; 311cb0ef41Sopenharmony_ci 321cb0ef41Sopenharmony_ci[SecureContext,Exposed=(Window,Worker)] 331cb0ef41Sopenharmony_ciinterface CryptoKey { 341cb0ef41Sopenharmony_ci readonly attribute KeyType type; 351cb0ef41Sopenharmony_ci readonly attribute boolean extractable; 361cb0ef41Sopenharmony_ci readonly attribute object algorithm; 371cb0ef41Sopenharmony_ci readonly attribute object usages; 381cb0ef41Sopenharmony_ci}; 391cb0ef41Sopenharmony_ci 401cb0ef41Sopenharmony_cienum KeyFormat { "raw", "spki", "pkcs8", "jwk" }; 411cb0ef41Sopenharmony_ci 421cb0ef41Sopenharmony_ci[SecureContext,Exposed=(Window,Worker)] 431cb0ef41Sopenharmony_ciinterface SubtleCrypto { 441cb0ef41Sopenharmony_ci Promise<any> encrypt(AlgorithmIdentifier algorithm, 451cb0ef41Sopenharmony_ci CryptoKey key, 461cb0ef41Sopenharmony_ci BufferSource data); 471cb0ef41Sopenharmony_ci Promise<any> decrypt(AlgorithmIdentifier algorithm, 481cb0ef41Sopenharmony_ci CryptoKey key, 491cb0ef41Sopenharmony_ci BufferSource data); 501cb0ef41Sopenharmony_ci Promise<any> sign(AlgorithmIdentifier algorithm, 511cb0ef41Sopenharmony_ci CryptoKey key, 521cb0ef41Sopenharmony_ci BufferSource data); 531cb0ef41Sopenharmony_ci Promise<any> verify(AlgorithmIdentifier algorithm, 541cb0ef41Sopenharmony_ci CryptoKey key, 551cb0ef41Sopenharmony_ci BufferSource signature, 561cb0ef41Sopenharmony_ci BufferSource data); 571cb0ef41Sopenharmony_ci Promise<any> digest(AlgorithmIdentifier algorithm, 581cb0ef41Sopenharmony_ci BufferSource data); 591cb0ef41Sopenharmony_ci 601cb0ef41Sopenharmony_ci Promise<any> generateKey(AlgorithmIdentifier algorithm, 611cb0ef41Sopenharmony_ci boolean extractable, 621cb0ef41Sopenharmony_ci sequence<KeyUsage> keyUsages ); 631cb0ef41Sopenharmony_ci Promise<any> deriveKey(AlgorithmIdentifier algorithm, 641cb0ef41Sopenharmony_ci CryptoKey baseKey, 651cb0ef41Sopenharmony_ci AlgorithmIdentifier derivedKeyType, 661cb0ef41Sopenharmony_ci boolean extractable, 671cb0ef41Sopenharmony_ci sequence<KeyUsage> keyUsages ); 681cb0ef41Sopenharmony_ci Promise<ArrayBuffer> deriveBits(AlgorithmIdentifier algorithm, 691cb0ef41Sopenharmony_ci CryptoKey baseKey, 701cb0ef41Sopenharmony_ci unsigned long length); 711cb0ef41Sopenharmony_ci 721cb0ef41Sopenharmony_ci Promise<CryptoKey> importKey(KeyFormat format, 731cb0ef41Sopenharmony_ci (BufferSource or JsonWebKey) keyData, 741cb0ef41Sopenharmony_ci AlgorithmIdentifier algorithm, 751cb0ef41Sopenharmony_ci boolean extractable, 761cb0ef41Sopenharmony_ci sequence<KeyUsage> keyUsages ); 771cb0ef41Sopenharmony_ci Promise<any> exportKey(KeyFormat format, CryptoKey key); 781cb0ef41Sopenharmony_ci 791cb0ef41Sopenharmony_ci Promise<any> wrapKey(KeyFormat format, 801cb0ef41Sopenharmony_ci CryptoKey key, 811cb0ef41Sopenharmony_ci CryptoKey wrappingKey, 821cb0ef41Sopenharmony_ci AlgorithmIdentifier wrapAlgorithm); 831cb0ef41Sopenharmony_ci Promise<CryptoKey> unwrapKey(KeyFormat format, 841cb0ef41Sopenharmony_ci BufferSource wrappedKey, 851cb0ef41Sopenharmony_ci CryptoKey unwrappingKey, 861cb0ef41Sopenharmony_ci AlgorithmIdentifier unwrapAlgorithm, 871cb0ef41Sopenharmony_ci AlgorithmIdentifier unwrappedKeyAlgorithm, 881cb0ef41Sopenharmony_ci boolean extractable, 891cb0ef41Sopenharmony_ci sequence<KeyUsage> keyUsages ); 901cb0ef41Sopenharmony_ci}; 911cb0ef41Sopenharmony_ci 921cb0ef41Sopenharmony_cidictionary RsaOtherPrimesInfo { 931cb0ef41Sopenharmony_ci // The following fields are defined in Section 6.3.2.7 of JSON Web Algorithms 941cb0ef41Sopenharmony_ci DOMString r; 951cb0ef41Sopenharmony_ci DOMString d; 961cb0ef41Sopenharmony_ci DOMString t; 971cb0ef41Sopenharmony_ci}; 981cb0ef41Sopenharmony_ci 991cb0ef41Sopenharmony_cidictionary JsonWebKey { 1001cb0ef41Sopenharmony_ci // The following fields are defined in Section 3.1 of JSON Web Key 1011cb0ef41Sopenharmony_ci DOMString kty; 1021cb0ef41Sopenharmony_ci DOMString use; 1031cb0ef41Sopenharmony_ci sequence<DOMString> key_ops; 1041cb0ef41Sopenharmony_ci DOMString alg; 1051cb0ef41Sopenharmony_ci 1061cb0ef41Sopenharmony_ci // The following fields are defined in JSON Web Key Parameters Registration 1071cb0ef41Sopenharmony_ci boolean ext; 1081cb0ef41Sopenharmony_ci 1091cb0ef41Sopenharmony_ci // The following fields are defined in Section 6 of JSON Web Algorithms 1101cb0ef41Sopenharmony_ci DOMString crv; 1111cb0ef41Sopenharmony_ci DOMString x; 1121cb0ef41Sopenharmony_ci DOMString y; 1131cb0ef41Sopenharmony_ci DOMString d; 1141cb0ef41Sopenharmony_ci DOMString n; 1151cb0ef41Sopenharmony_ci DOMString e; 1161cb0ef41Sopenharmony_ci DOMString p; 1171cb0ef41Sopenharmony_ci DOMString q; 1181cb0ef41Sopenharmony_ci DOMString dp; 1191cb0ef41Sopenharmony_ci DOMString dq; 1201cb0ef41Sopenharmony_ci DOMString qi; 1211cb0ef41Sopenharmony_ci sequence<RsaOtherPrimesInfo> oth; 1221cb0ef41Sopenharmony_ci DOMString k; 1231cb0ef41Sopenharmony_ci}; 1241cb0ef41Sopenharmony_ci 1251cb0ef41Sopenharmony_citypedef Uint8Array BigInteger; 1261cb0ef41Sopenharmony_ci 1271cb0ef41Sopenharmony_cidictionary CryptoKeyPair { 1281cb0ef41Sopenharmony_ci CryptoKey publicKey; 1291cb0ef41Sopenharmony_ci CryptoKey privateKey; 1301cb0ef41Sopenharmony_ci}; 1311cb0ef41Sopenharmony_ci 1321cb0ef41Sopenharmony_cidictionary RsaKeyGenParams : Algorithm { 1331cb0ef41Sopenharmony_ci required [EnforceRange] unsigned long modulusLength; 1341cb0ef41Sopenharmony_ci required BigInteger publicExponent; 1351cb0ef41Sopenharmony_ci}; 1361cb0ef41Sopenharmony_ci 1371cb0ef41Sopenharmony_cidictionary RsaHashedKeyGenParams : RsaKeyGenParams { 1381cb0ef41Sopenharmony_ci required HashAlgorithmIdentifier hash; 1391cb0ef41Sopenharmony_ci}; 1401cb0ef41Sopenharmony_ci 1411cb0ef41Sopenharmony_cidictionary RsaKeyAlgorithm : KeyAlgorithm { 1421cb0ef41Sopenharmony_ci required unsigned long modulusLength; 1431cb0ef41Sopenharmony_ci required BigInteger publicExponent; 1441cb0ef41Sopenharmony_ci}; 1451cb0ef41Sopenharmony_ci 1461cb0ef41Sopenharmony_cidictionary RsaHashedKeyAlgorithm : RsaKeyAlgorithm { 1471cb0ef41Sopenharmony_ci required KeyAlgorithm hash; 1481cb0ef41Sopenharmony_ci}; 1491cb0ef41Sopenharmony_ci 1501cb0ef41Sopenharmony_cidictionary RsaHashedImportParams : Algorithm { 1511cb0ef41Sopenharmony_ci required HashAlgorithmIdentifier hash; 1521cb0ef41Sopenharmony_ci}; 1531cb0ef41Sopenharmony_ci 1541cb0ef41Sopenharmony_cidictionary RsaPssParams : Algorithm { 1551cb0ef41Sopenharmony_ci required [EnforceRange] unsigned long saltLength; 1561cb0ef41Sopenharmony_ci}; 1571cb0ef41Sopenharmony_ci 1581cb0ef41Sopenharmony_cidictionary RsaOaepParams : Algorithm { 1591cb0ef41Sopenharmony_ci BufferSource label; 1601cb0ef41Sopenharmony_ci}; 1611cb0ef41Sopenharmony_ci 1621cb0ef41Sopenharmony_cidictionary EcdsaParams : Algorithm { 1631cb0ef41Sopenharmony_ci required HashAlgorithmIdentifier hash; 1641cb0ef41Sopenharmony_ci}; 1651cb0ef41Sopenharmony_ci 1661cb0ef41Sopenharmony_citypedef DOMString NamedCurve; 1671cb0ef41Sopenharmony_ci 1681cb0ef41Sopenharmony_cidictionary EcKeyGenParams : Algorithm { 1691cb0ef41Sopenharmony_ci required NamedCurve namedCurve; 1701cb0ef41Sopenharmony_ci}; 1711cb0ef41Sopenharmony_ci 1721cb0ef41Sopenharmony_cidictionary EcKeyAlgorithm : KeyAlgorithm { 1731cb0ef41Sopenharmony_ci required NamedCurve namedCurve; 1741cb0ef41Sopenharmony_ci}; 1751cb0ef41Sopenharmony_ci 1761cb0ef41Sopenharmony_cidictionary EcKeyImportParams : Algorithm { 1771cb0ef41Sopenharmony_ci required NamedCurve namedCurve; 1781cb0ef41Sopenharmony_ci}; 1791cb0ef41Sopenharmony_ci 1801cb0ef41Sopenharmony_cidictionary EcdhKeyDeriveParams : Algorithm { 1811cb0ef41Sopenharmony_ci required CryptoKey public; 1821cb0ef41Sopenharmony_ci}; 1831cb0ef41Sopenharmony_ci 1841cb0ef41Sopenharmony_cidictionary AesCtrParams : Algorithm { 1851cb0ef41Sopenharmony_ci required BufferSource counter; 1861cb0ef41Sopenharmony_ci required [EnforceRange] octet length; 1871cb0ef41Sopenharmony_ci}; 1881cb0ef41Sopenharmony_ci 1891cb0ef41Sopenharmony_cidictionary AesKeyAlgorithm : KeyAlgorithm { 1901cb0ef41Sopenharmony_ci required unsigned short length; 1911cb0ef41Sopenharmony_ci}; 1921cb0ef41Sopenharmony_ci 1931cb0ef41Sopenharmony_cidictionary AesKeyGenParams : Algorithm { 1941cb0ef41Sopenharmony_ci required [EnforceRange] unsigned short length; 1951cb0ef41Sopenharmony_ci}; 1961cb0ef41Sopenharmony_ci 1971cb0ef41Sopenharmony_cidictionary AesDerivedKeyParams : Algorithm { 1981cb0ef41Sopenharmony_ci required [EnforceRange] unsigned short length; 1991cb0ef41Sopenharmony_ci}; 2001cb0ef41Sopenharmony_ci 2011cb0ef41Sopenharmony_cidictionary AesCbcParams : Algorithm { 2021cb0ef41Sopenharmony_ci required BufferSource iv; 2031cb0ef41Sopenharmony_ci}; 2041cb0ef41Sopenharmony_ci 2051cb0ef41Sopenharmony_cidictionary AesGcmParams : Algorithm { 2061cb0ef41Sopenharmony_ci required BufferSource iv; 2071cb0ef41Sopenharmony_ci BufferSource additionalData; 2081cb0ef41Sopenharmony_ci [EnforceRange] octet tagLength; 2091cb0ef41Sopenharmony_ci}; 2101cb0ef41Sopenharmony_ci 2111cb0ef41Sopenharmony_cidictionary HmacImportParams : Algorithm { 2121cb0ef41Sopenharmony_ci required HashAlgorithmIdentifier hash; 2131cb0ef41Sopenharmony_ci [EnforceRange] unsigned long length; 2141cb0ef41Sopenharmony_ci}; 2151cb0ef41Sopenharmony_ci 2161cb0ef41Sopenharmony_cidictionary HmacKeyAlgorithm : KeyAlgorithm { 2171cb0ef41Sopenharmony_ci required KeyAlgorithm hash; 2181cb0ef41Sopenharmony_ci required unsigned long length; 2191cb0ef41Sopenharmony_ci}; 2201cb0ef41Sopenharmony_ci 2211cb0ef41Sopenharmony_cidictionary HmacKeyGenParams : Algorithm { 2221cb0ef41Sopenharmony_ci required HashAlgorithmIdentifier hash; 2231cb0ef41Sopenharmony_ci [EnforceRange] unsigned long length; 2241cb0ef41Sopenharmony_ci}; 2251cb0ef41Sopenharmony_ci 2261cb0ef41Sopenharmony_cidictionary HkdfParams : Algorithm { 2271cb0ef41Sopenharmony_ci required HashAlgorithmIdentifier hash; 2281cb0ef41Sopenharmony_ci required BufferSource salt; 2291cb0ef41Sopenharmony_ci required BufferSource info; 2301cb0ef41Sopenharmony_ci}; 2311cb0ef41Sopenharmony_ci 2321cb0ef41Sopenharmony_cidictionary Pbkdf2Params : Algorithm { 2331cb0ef41Sopenharmony_ci required BufferSource salt; 2341cb0ef41Sopenharmony_ci required [EnforceRange] unsigned long iterations; 2351cb0ef41Sopenharmony_ci required HashAlgorithmIdentifier hash; 2361cb0ef41Sopenharmony_ci}; 237