Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

gh-99108: Refresh HACL* from upstream #104401

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

Merged
merged 2 commits into from
May 11, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Companion test
  • Loading branch information
msprotz committed May 11, 2023
commit 0128cf915aaaad2a653889b15f59de5e71829852
9 changes: 9 additions & 0 deletions 9 Lib/test/test_hashlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,15 @@ def test_sha256_update_over_4gb(self):
h.update(b"hello world")
self.assertEqual(h.hexdigest(), "a5364f7a52ebe2e25f1838a4ca715a893b6fd7a23f2a0d9e9762120da8b1bf53")

@requires_resource('cpu')
def test_sha3_256_update_over_4gb(self):
zero_1mb = b"\0" * 1024 * 1024
h = hashlib.sha3_256()
for i in range(0, 4096):
h.update(zero_1mb)
h.update(b"hello world")
self.assertEqual(h.hexdigest(), "e2d4535e3b613135c14f2fe4e026d7ad8d569db44901740beffa30d430acb038")

def check(self, name, data, hexdigest, shake=False, **kwargs):
length = len(hexdigest)//2
hexdigest = hexdigest.lower()
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.