subtle.verify(algorithm, key, signature, data)


使用 algorithm 中给出的方法和参数以及 key 提供的密钥材料,subtle.verify() 尝试验证 signaturedata 的有效密码签名。返回的 promise 通过 truefalse 解决。

¥Using the method and parameters given in algorithm and the keying material provided by key, subtle.verify() attempts to verify that signature is a valid cryptographic signature of data. The returned promise is resolved with either true or false.

目前支持的算法包括:

¥The algorithms currently supported include:

  • 'RSASSA-PKCS1-v1_5'

  • 'RSA-PSS'

  • 'ECDSA'

  • 'Ed25519'

  • 'Ed448' 1

  • 'HMAC'