aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/cryptokey/index.html
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/api/cryptokey/index.html
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/api/cryptokey/index.html')
-rw-r--r--files/zh-cn/web/api/cryptokey/index.html108
1 files changed, 108 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/cryptokey/index.html b/files/zh-cn/web/api/cryptokey/index.html
new file mode 100644
index 0000000000..57f11ff55f
--- /dev/null
+++ b/files/zh-cn/web/api/cryptokey/index.html
@@ -0,0 +1,108 @@
+---
+title: CryptoKey
+slug: Web/API/CryptoKey
+translation_of: Web/API/CryptoKey
+---
+<p>{{APIRef("Web Crypto API")}}</p>
+
+<p><strong><code>CryptoKey</code></strong> 接口表示从特定的密钥算法导出的{{glossary("密钥")}}。</p>
+
+<p>一个 <code>CryptoKey</code> 对象可以使用 {{domxref("SubtleCrypto.generateKey()")}}, {{domxref("SubtleCrypto.deriveKey()")}} or {{domxref("SubtleCrypto.importKey()")}} 获得。</p>
+
+<h2 id="属性">属性</h2>
+
+<p><em>这个接口不继承任何属性。</em></p>
+
+<dl>
+ <dt>{{domxref("CryptoKey.type")}}</dt>
+ <dd>返回一个表示密钥类型的枚举值,一个密钥(对称算法),一个公钥或一个私钥(非对称算法)。</dd>
+ <dt>{{domxref("CryptoKey.extractable")}}</dt>
+ <dd>返回一个{{jsxref("布尔值")}},表示原始信息是否能导出到应用程序。</dd>
+ <dt>{{domxref("CryptoKey.algorithm")}}</dt>
+ <dd>返回一个不透明对象,表示必须与密钥一同使用的特定密码。</dd>
+ <dt>{{domxref("CryptoKey.usages")}}</dt>
+ <dd>返回一个可枚举的数组,来指出什么密钥可以使用。</dd>
+</dl>
+
+<h2 id="方法">方法</h2>
+
+<p><em>这个接口既不继承也不实现任何方法。</em></p>
+
+<h2 id="规范">规范</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">规范</th>
+ <th scope="col">状态</th>
+ <th scope="col">评论</th>
+ </tr>
+ <tr>
+ <td>{{ SpecName('Web Crypto API', '#dfn-CryptoKey', 'CryptoKey') }}</td>
+ <td>{{ Spec2('Web Crypto API') }}</td>
+ <td>Initial definition.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+<p>{{ CompatibilityTable() }}</p>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Chrome</th>
+ <th>Edge</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{ CompatChrome(37) }}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{ CompatGeckoDesktop(34) }}</td>
+ <td>{{ CompatNo() }}</td>
+ <td>{{ CompatUnknown() }}</td>
+ <td>{{ CompatNo }}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Android</th>
+ <th>Chrome for Android</th>
+ <th>Edge</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>37</td>
+ <td>{{ CompatChrome(37) }}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{ CompatGeckoMobile(34) }}</td>
+ <td>{{ CompatNo }}</td>
+ <td>{{ CompatUnknown() }}</td>
+ <td>{{ CompatNo }}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<h2 id="其它相关">其它相关</h2>
+
+<ul>
+ <li>{{domxref("Crypto")}} and {{domxref("Crypto.subtle")}}.</li>
+</ul>