Skip to content

Improve the type of signature padding types. #1887

Closed as not planned
Closed as not planned
@briansmith

Description

@briansmith

The signature padding constants are of type PSS (for 'RSA_PSS_SHA256', 'RSA_PSS_SHA384', and 'RSA_PSS_SHA512') and PKCS1 (for RSA_PKCS1_SHA256, RSA_PKCS1_SHA384, and RSA_PKCS1_SHA512). But, PSS and PKCS1 are not actually exported.

This makes it difficult to discover how to use the API because these values are used with functions that take &dyn Padding values but there's nothing in the rustdoc that indicates that PSS and PKCS1 implement Padding.

Perhaps instead these values should have type &'static dyn Padding.

I think this would be a SemVer-breaking change.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions