(self)
| 445 | |
| 446 | @requires_resource('cpu') |
| 447 | def test_blake2_update_over_4gb(self): |
| 448 | # blake2s or blake2b doesn't matter based on how our C code is structured, this tests the |
| 449 | # common loop macro logic. |
| 450 | zero_1mb = b"\0" * 1024 * 1024 |
| 451 | h = hashlib.blake2s() |
| 452 | for i in range(0, 4096): |
| 453 | h.update(zero_1mb) |
| 454 | h.update(b"hello world") |
| 455 | self.assertEqual(h.hexdigest(), "8a268e83dd30528bc0907fa2008c91de8f090a0b6e0e60a5ff0d999d8485526f") |
| 456 | |
| 457 | def check(self, name, data, hexdigest, shake=False, **kwargs): |
| 458 | length = len(hexdigest)//2 |
nothing calls this directly
no test coverage detected