aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/crypto/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/crypto/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/crypto/index.html')
-rw-r--r--files/zh-cn/web/api/crypto/index.html61
1 files changed, 61 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/crypto/index.html b/files/zh-cn/web/api/crypto/index.html
new file mode 100644
index 0000000000..25056293b3
--- /dev/null
+++ b/files/zh-cn/web/api/crypto/index.html
@@ -0,0 +1,61 @@
+---
+title: Crypto
+slug: Web/API/Crypto
+tags:
+ - 加密
+translation_of: Web/API/Crypto
+---
+<p>{{APIRef("Web Crypto API")}}</p>
+
+<p><code><strong>Crypto</strong></code> 接口提供了基本的加密功能,可用于当前的上下文中。它允许访问一个密码强度的随机数生成器和 cryptographic primitives。</p>
+
+<p>该接口在 Web 中可以通过 {{domxref("Window.crypto")}} 属性来访问。</p>
+
+<h2 id="属性">属性</h2>
+
+<p><em>该接口实现的属性定义在 {{domxref("RandomSource")}} 中。</em></p>
+
+<dl>
+ <dt>{{domxref("Crypto.subtle")}} {{experimental_inline}}{{readOnlyInline}}</dt>
+ <dd>返回一个 {{domxref("SubtleCrypto")}} 对象, 用来访问公共的 cryptographic primitives,例如哈希、签名、加密以及解密。</dd>
+</dl>
+
+<h2 id="方法">方法</h2>
+
+<p><em>该接口实现的方法定义在 {{domxref("RandomSource")}} 中。</em></p>
+
+<dl>
+ <dt>{{ domxref("RandomSource.getRandomValues()") }}</dt>
+ <dd>使用 cryptographically sound 随机数填充 {{ jsxref("TypedArray") }}。</dd>
+</dl>
+
+<h2 id="规范">规范</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName("Web Crypto API", "#crypto-interface", "Crypto")}}</td>
+ <td>{{Spec2("Web Crypto API")}}</td>
+ <td>Initial definition</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器兼容">浏览器兼容</h2>
+
+
+
+<p>{{Compat("api.Crypto")}}</p>
+
+<h2 id="参见">参见</h2>
+
+<ul>
+ <li><a href="/en-US/docs/Components.utils.importGlobalProperties">Components.utils.importGlobalProperties</a></li>
+</ul>