subtle.deriveBits(algorithm, baseKey, length)
algorithm:<AlgorithmIdentifier> | <EcdhKeyDeriveParams> | <HkdfParams> | <Pbkdf2Params>baseKey:<CryptoKey>length:<number>- 返回:<Promise> 包含 <ArrayBuffer>
使用 algorithm 中指定的方法和参数以及 baseKey 提供的密钥材料,subtle.deriveBits() 尝试生成 length 位。如果成功,返回的 promise 将会被解析为包含生成数据的 <ArrayBuffer>。Node.js 的实现要求 length 必须是 8 的倍数。
🌐 Using the method and parameters specified in algorithm and the keying
material provided by baseKey, subtle.deriveBits() attempts to generate
length bits. The Node.js implementation requires that length is a
multiple of 8. If successful, the returned promise will be resolved with
an <ArrayBuffer> containing the generated data.
目前支持的算法包括:
🌐 The algorithms currently supported include:
'ECDH''HKDF''PBKDF2'