Chore: Buffered_Computation can deal with generic containers#3294
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 <philippe.lieser@rohde-schwarz.com>
Co-Authored-By: Philippe Lieser <philippe.lieser@rohde-schwarz.com>
Co-Authored-By: Philippe Lieser <philippe.lieser@rohde-schwarz.com>
|
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 |
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_Computationin user-defined contiguous containers.The latter is most-useful for the strong types: