subtle.encrypt(algorithm, key, data)


版本历史
版本变更
v24.7.0

现已支持 AES-OCB 算法。

v24.7.0

现在支持 ChaCha20-Poly1305 算法。

v15.0.0

新增于: v15.0.0

此方法使用 algorithm 指定的方法和参数以及 key 提供的密钥材料,尝试加密 data。如果成功,返回的 promise 将使用包含加密结果的 <ArrayBuffer> 进行解析。

\Using the method and parameters specified by algorithm and the keying material provided by key, this method attempts to encipher data. If successful, the returned promise is resolved with an <ArrayBuffer> containing the encrypted result.

目前支持的算法包括:

\The algorithms currently supported include:

  • 'AES-CBC'

  • 'AES-CTR'

  • 'AES-GCM'

  • 'AES-OCB'4

  • 'ChaCha20-Poly1305'4

  • 'RSA-OAEP'

AltStyle によって変換されたページ (->オリジナル) /