subtle.deriveBits(algorithm, baseKey[, length])


版本历史
版本变更
v24.8.0

现在支持 Argon2 算法。

v22.5.0, v20.17.0, v18.20.5

对于 'ECDH''X25519''X448',长度参数现在是可选的。

v18.4.0, v16.17.0

添加了 'X25519''X448' 算法。

v15.0.0

新增于: v15.0.0

此方法使用 algorithm 指定的方法和参数以及 baseKey 提供的密钥材料,尝试生成 length 位。

\Using the method and parameters specified in algorithm and the keying material provided by baseKey, this method attempts to generate length bits.

当未提供 lengthnull 时,将生成给定算法的最大位数。'ECDH''X25519''X448'5 算法允许这样做,对于其他算法,length 必须为数字。

\When length is not provided or null the maximum number of bits for a given algorithm is generated. This is allowed for the 'ECDH', 'X25519', and 'X448'5 algorithms, for other algorithms length is required to be a number.

如果成功,返回的 promise 将使用包含生成数据的 <ArrayBuffer> 进行解析。

\If successful, the returned promise will be resolved with an <ArrayBuffer> containing the generated data.

目前支持的算法包括:

\The algorithms currently supported include:

  • 'Argon2d'4

  • 'Argon2i'4

  • 'Argon2id'4

  • 'ECDH'

  • 'HKDF'

  • 'PBKDF2'

  • 'X25519'

  • 'X448'5

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