/
githubmirror
/
servo
Обзор
Документация
Войти
/
githubmirror
/
servo
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
components/script_bindings/webidls/CryptoKey.webidl
25 строк
1 KB
Kingsley Yung
script: Serialization of `CryptoKey` interface (#45163)
27 май 2026, 09:34
Не верифицирован
27 май 2026, 09:34
c89ec08
Код
Авторство
О чём код?
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ // https://w3c.github.io/webcrypto/#cryptokey-interface enum KeyType { "public", "private", "secret" }; // enum KeyUsage { "encrypt", "decrypt", "sign", "verify", "deriveKey", "deriveBits", "wrapKey", "unwrapKey" }; [SecureContext, Exposed=(Window,Worker), Serializable, Pref="dom_crypto_subtle_enabled"] interface CryptoKey { readonly attribute KeyType type; readonly attribute boolean extractable; readonly attribute object algorithm; readonly attribute object usages; }; // https://w3c.github.io/webcrypto/#keypair dictionary CryptoKeyPair { CryptoKey publicKey; CryptoKey privateKey; }; // https://wicg.github.io/webcrypto-modern-algos/#subtlecrypto-interface-keyusage enum KeyUsage { "encrypt", "decrypt", "sign", "verify", "deriveKey", "deriveBits", "wrapKey", "unwrapKey", "encapsulateKey", "encapsulateBits", "decapsulateKey", "decapsulateBits" };