(self, key, chunks)
| 1198 | raise NotImplementedError |
| 1199 | |
| 1200 | def check_update(self, key, chunks): |
| 1201 | chunks = list(chunks) |
| 1202 | msg = b''.join(chunks) |
| 1203 | h1 = self.HMAC(key, msg) |
| 1204 | |
| 1205 | h2 = self.HMAC(key) |
| 1206 | for chunk in chunks: |
| 1207 | h2.update(chunk) |
| 1208 | |
| 1209 | self.assertEqual(h1.digest(), h2.digest()) |
| 1210 | self.assertEqual(h1.hexdigest(), h2.hexdigest()) |
| 1211 | |
| 1212 | def test_update(self): |
| 1213 | key, msg = random.randbytes(16), random.randbytes(16) |