Skip to content

Allocation-free operations? #346

@bal-e

Description

@bal-e

I noticed that Session::sign(), and the alternative sign_init()/sign_update()/sign_final() methods, always perform heap allocations (sign() and sign_final() both return Vec). At least for my use case, I already know which cryptographic algorithm is being used, so I know exactly how big the resulting signature should be. I'd like to have non-allocating methods, where I can pass in a buffer of a pre-determined size, just for efficiency.

This concern probably extends to all the other PKCS#11 operations. If this feels like a worthwhile change, I'm happy to put up PRs (at least for a few interesting operations). But I wanted to check in before getting started.

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