-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src: Add a Reinitialize function for the Incremental classes.
I believe this is the best approach. - Reset() would imply that the same parameters were being used and would work best if the inputs were cached then disposed. However, that's something I'm trying to avoid, and that also doesn't make sense with Poly1305 since the key can only be used once. - A FinalizeAndReset() function would save a line of code for the user but FinalizeAndVerifyAndReset() looks horrible and requires another function. Plus see the comments above. - Switching to an NSec style API would be a breaking change and unnecessarily exposes the state to the user. Furthermore, the new state requires a different name, and the function naming is longer compared to a using statement where the user names it (e.g., IncrementalXChaCha20Poly1305.Push vs secretstream.Push).
- Loading branch information
1 parent
6eff95e
commit 998b1c6
Showing
8 changed files
with
156 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters