EcdsaParams

EcdsaParams dictionary of the Web 加密 API represents the object that should be passed as the algorithm parameter into SubtleCrypto.sign() or SubtleCrypto.verify() when using the ECDSA algorithm.

特性

name
A DOMString . This should be set to ECDSA .
hash
A DOMString . An identifier for the digest algorithm to use. This should be one of the following:

警告 : SHA-1 is also supported here but the SHA-1 algorithm is considered vulnerable and should no longer be used.

范例

See the examples for SubtleCrypto.sign() or SubtleCrypto.verify() .

规范

规范 状态 Comment
Web Cryptography API
The definition of 'SubtleCrypto.EcdsaParams' in that specification.
Recommendation

浏览器兼容性

Browsers that support the "ECDSA" algorithm for the SubtleCrypto.sign() and SubtleCrypto.verify() methods will support this type.

更新 GitHub 上的兼容性数据
Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
sign Chrome 37 Edge 部分支持 12
部分支持 12
Not supported: RSA-PSS, ECDSA.
Firefox 34
34
不支持 32 — 34
Disabled
Disabled From version 32 until version 34 (exclusive): this feature is behind the dom.webcrypto.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
IE 部分支持 11
部分支持 11
返回 CryptoOperation instead of Promise
Opera 24 Safari 7 WebView Android 37 Chrome Android 37 Firefox Android 34
34
不支持 32 — 34
Disabled
Disabled From version 32 until version 34 (exclusive): this feature is behind the dom.webcrypto.enabled preference (needs to be set to true ). To change preferences in Firefox, visit about:config.
Opera Android 24 Safari iOS 7 Samsung Internet Android 6.0

图例

完整支持
完整支持
部分支持
部分支持
见实现注意事项。
用户必须明确启用此特征。
用户必须明确启用此特征。

另请参阅