Create EncodingKey/DecodingKey from borrowed data#499
Create EncodingKey/DecodingKey from borrowed data#499uklotzde wants to merge 1 commit intoKeats:masterfrom
Conversation
Avoid allocations by capturing borrowed data as `Cow::Borrowed`.
|
Creates conflicts with #483 that should be easy to resolve. |
|
So I very briefly looked at this, and while it seems fine in theory I don't quite understand the use case. |
|
Use case: We store the owned, secret data separately and only expose it temporarily to |
|
I don't think this is a good way to solve the problem unfortunately, especially since it does nothing for people that use PEM |
|
Don't mind. This was just proposed as an optimization to avoid an unnecessary allocation. Performance is not an issue for us (yet). The plugin/provider concept sounds reasonable and avoids to make an opinionated decision with new dependencies. Clients should be free to decide how and where they store their secrets. A default provider could be provided behind a feature flag for convenience. |
Avoid allocations by capturing borrowed data as
Cow::Borrowed.