(self)
| 514 | @requires_resource('cpu') |
| 515 | @requires_blake2 |
| 516 | def test_blake2_update_over_4gb(self): |
| 517 | # blake2s or blake2b doesn't matter based on how our C code is structured, this tests the |
| 518 | # common loop macro logic. |
| 519 | zero_1mb = b"\0" * 1024 * 1024 |
| 520 | h = hashlib.blake2s() |
| 521 | for i in range(0, 4096): |
| 522 | h.update(zero_1mb) |
| 523 | h.update(b"hello world") |
| 524 | self.assertEqual(h.hexdigest(), "8a268e83dd30528bc0907fa2008c91de8f090a0b6e0e60a5ff0d999d8485526f") |
| 525 | |
| 526 | def check(self, name, data, hexdigest, shake=False, **kwargs): |
| 527 | length = len(hexdigest)//2 |
nothing calls this directly
no test coverage detected