subtle.encrypt(algorithm, key, data)
algorithm<RsaOaepParams> | <AesCtrParams> | <AesCbcParams> | <AesGcmParams>key<CryptoKey>data<ArrayBuffer> | <TypedArray> | <DataView> | <Buffer>- 返回:<Promise> 在成功时以 <ArrayBuffer> 完成。
使用由 algorithm 指定的方法和参数,以及由 key 提供的密钥材料,subtle.encrypt() 尝试对 data 进行加密。如果成功,返回的 Promise 将被解析为包含加密结果的 <ArrayBuffer>。
🌐 Using the method and parameters specified by algorithm and the keying
material provided by key, subtle.encrypt() attempts to encipher data.
If successful, the returned promise is resolved with an <ArrayBuffer>
containing the encrypted result.
目前支持的算法包括:
🌐 The algorithms currently supported include:
'RSA-OAEP''AES-CTR''AES-CBC''AES-GCM'