-
Notifications
You must be signed in to change notification settings - Fork 574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chore: Buffered_Computation can deal with generic containers #3294
Conversation
This should be a transparent change for the most part but enables modern support for all sorts of containers without resorting to the C-style pointer APIs
Co-Authored-By: Philippe Lieser <[email protected]>
Co-Authored-By: Philippe Lieser <[email protected]>
Co-Authored-By: Philippe Lieser <[email protected]>
Sorry, I should have marked this as a draft while I was still working on it. We added another overload for |
I deliberately left the virtual methods (below) untouched to get the low hanging fruits first. virtual void add_data(const uint8_t input[], size_t length) = 0;
virtual void final_result(uint8_t out[]) = 0; Though, both are good candidates for What's your take on this? Should we take this on? |
Codecov ReportBase: 88.08% // Head: 88.09% // Increases project coverage by
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## master #3294 +/- ##
==========================================
+ Coverage 88.08% 88.09% +0.01%
==========================================
Files 610 611 +1
Lines 68481 68577 +96
Branches 6830 6832 +2
==========================================
+ Hits 60322 60414 +92
- Misses 5303 5310 +7
+ Partials 2856 2853 -3
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Sure, using span internally here would be a lot cleaner overall. But also a lot of work since you'll have to touch every hash/MAC. Those kind of changes tend to be a slog. |
@randombit I didn't merge this yet because I pushed some API changes after you approved the PR. Most notably: c4582aa |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
This should be a transparent change for the most part but enables modern support for all sorts of containers without resorting to the C-style pointer APIs.
Allows passing all sorts of contiguous ranges to
::update()
and::process()
as well as storing results ofBuffered_Computation
in user-defined contiguous containers.The latter is most-useful for the strong types: