-
Notifications
You must be signed in to change notification settings - Fork 585
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
[std::span] Pass std::span buffers into Block_Cipher Implementations #3870
Conversation
2a75417
to
927ac16
Compare
927ac16
to
d7605c2
Compare
506ea76
to
7c61322
Compare
This demotes Block_Cipher::encrypt_n/decrypt_n to top-level methods and introduces new (private) virtual methods (encrypt/decrypt_blocks) that use std::span for the in/out buffers. Also, this adapts all block cipher implementations in the library to use the new API.
7c61322
to
e5ead5f
Compare
Sorry just getting back to this. I'm not sold on this change as it stands because it has two effects
That said
Then when things reach the point that it's clear there are substantial improvements in usability we can switch over wholesale. [*] I've traditionally used Blowfish as my arbitrary choice for these kinds of things, because it's very fast so any performance impacts are visible, and it's not "important" so if bugs are introduced it's not the end of the world. |
Agreed. See #4151. Closing for now. |
This demotes Block_Cipher::encrypt_n/decrypt_n to top-level methods and introduces new (private) virtual methods (encrypt/decrypt_blocks) that use std::span for the in/out buffers. Also, this adapts all block cipher implementations in the library to use the new API.