-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test vectors for extremely long SHA256 messages
One of the new vectors is a message of size 2^33 bits and verifies that we handle the bit counter in the SHA256 correctly. The vectors have been taken from https://www.di-mgt.com.au/sha_testvectors.html. They can be independently verified using the following Python code. ``` h = hashlib.sha256() for i in range(1_000_000): h.update(b'a') print(h.hexdigest()) h = hashlib.sha256() for i in range(16_777_216): h.update(b'abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmno') print(h.hexdigest()) ```
- Loading branch information
1 parent
33d0871
commit efb0069
Showing
1 changed file
with
31 additions
and
12 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