-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add hash customization traits (#1334)
Some hash function constructions allow to have a customization string to have domain separation in hash functions. This is the case for [CSHAKE](https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-185.pdf#page=14) and [Blake2](https://www.blake2.net/blake2.pdf#page=6): With these new traits, the construction of hash functions with customization strings would be simpler. From currently for CSHAKE: ```rust let mut hasher = CShake128::from_core(CShake128Core::new(b"test")); ``` To: ```rust let mut hasher = CShake128:new_personalization(b"test")); ```
- Loading branch information
1 parent
dadaf35
commit a593570
Showing
3 changed files
with
42 additions
and
2 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