Skip to content

Should PaddingScheme be a trait instead of an enum? #226

@tarcieri

Description

@tarcieri

Looking at issues like #215 it seems like requirements of certain variants are making the others somewhat harder to use.

The PKCS1v15Encrypt and PKCS1v15Sign have relatively minimal requirements with PKCS1v15Encrypt having no members whatsoever, whereas OAEP and PSS both need Box<dyn DynDigest + Send + Sync>.

Having a trait would allow the impls to live in e.g. pkcs1v15 and pss modules as well, whereas right now the pkcs1v15 module only exposes encryption-related functionality.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions