Refactor: Remove MDx_HashFunction#3705
Conversation
febaf6a to
0548e7d
Compare
54c4f89 to
4c45536
Compare
|
Rebased to master after #3693 got merged. |
randombit
left a comment
There was a problem hiding this comment.
I haven't done a complete review yet, but yeah looks pretty good.
Please do check that this doesn't introduce performance regressions.
|
On my machine anyway this seems very slightly slower, but it's under .1 cycles per byte and mostly notable for MD4/MD5 where the compression function is very cheap - seems fine. |
randombit
left a comment
There was a problem hiding this comment.
Did a full review, this is basically fine outside of some quibbling about what should or should not be inline.
4c45536 to
3e61eba
Compare
|
Thanks for the review! I'm glad you like this design. I'm done with addressing your comments. I.e. renaming the MD hash template variable from |
Pull Request Dependencies
Refactor: AlignmentBuffer<> helper for block-oriented Hashes #3693Description
This is a re-iteration of #3550 which became stale mostly due to
clang-format. Note that I took the liberty to implement the alternative suggestion on configuring the instances' static configurations. I posted this on the original pull request: #3550 (comment).In my opinion, this has two important advantages:
sha2_32.hand go forSHA_256::output_bytes.@randombit I'd be interested in your opinion on the usefulness of exposing some algorithm specifics statically. FWIW: Here's another example where this would be helpful: #3609 (comment). To be clear: I think, this should be an internal feature and not exposed via public API.