subtle.sign(algorithm, key, data)
algorithm: <AlgorithmIdentifier> | <RsaPssParams> | <EcdsaParams> | <Ed448Params>key: <CryptoKey>data: <ArrayBuffer> | <TypedArray> | <DataView> | <Buffer>- 返回:<Promise> 以 <ArrayBuffer> 完成
使用 algorithm 提供的方法和参数以及 key 提供的密钥材料,subtle.sign() 尝试生成 data 的加密签名。如果成功,返回的 Promise 将会被解决,并返回一个包含生成签名的 <ArrayBuffer>。
【Using the method and parameters given by algorithm and the keying material
provided by key, subtle.sign() 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:】
'RSASSA-PKCS1-v1_5''RSA-PSS''ECDSA''Ed25519''Ed448'1'HMAC'