subtle.sign(algorithm, key, data)


版本历史
版本变更
v24.8.0

现在支持 KMAC 算法。

v24.7.0

现在支持 ML-DSA 算法。

v18.4.0, v16.17.0

添加了 'Ed25519''Ed448' 算法。

v15.0.0

新增于: v15.0.0

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

\Using the method and parameters given by algorithm and the keying material provided by key, this method attempts to generate a cryptographic signature of data. If successful, the returned promise is resolved with an <ArrayBuffer> containing the generated signature.

目前支持的算法包括:

\The algorithms currently supported include:

  • 'ECDSA'

  • 'Ed25519'

  • 'Ed448'5

  • 'HMAC'

  • 'KMAC128'4

  • 'KMAC256'4

  • 'ML-DSA-44'4

  • 'ML-DSA-65'4

  • 'ML-DSA-87'4

  • 'RSA-PSS'

  • 'RSASSA-PKCS1-v1_5'

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