RsaPssParams - Web APIs 编辑

The RsaPssParams dictionary of the Web Crypto API represents the object that should be passed as the algorithm parameter into SubtleCrypto.sign() or SubtleCrypto.verify(), when using the RSA-PSS algorithm.

Properties

name
A DOMString. This should be set to RSA-PSS.
saltLength

A long integer representing the length of the random salt to use, in bytes.

RFC 3447 says that "Typical salt lengths" are either 0 or the length of the output of the digest algorithm that was selected when this key was generated. For example, if you use SHA-256 as the digest algorithm, this could be 32.

The maximum size of saltLength is given by:

Math.ceil((keySizeInBits - 1)/8) - digestSizeInBytes - 2

So for a key length of 2048 bits and a digest output size of 32 bytes, the maximum size would be 222.

Examples

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

Specifications

SpecificationStatusComment
Web Cryptography API
The definition of 'SubtleCrypto.RsaPssParams' in that specification.
Recommendation 

Browser compatibility

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

See also

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:96 次

字数:3254

最后编辑:6 年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文