(self, key, chunks)
| 1152 | raise NotImplementedError |
| 1153 | |
| 1154 | def check_update(self, key, chunks): |
| 1155 | chunks = list(chunks) |
| 1156 | msg = b''.join(chunks) |
| 1157 | h1 = self.HMAC(key, msg) |
| 1158 | |
| 1159 | h2 = self.HMAC(key) |
| 1160 | for chunk in chunks: |
| 1161 | h2.update(chunk) |
| 1162 | |
| 1163 | self.assertEqual(h1.digest(), h2.digest()) |
| 1164 | self.assertEqual(h1.hexdigest(), h2.hexdigest()) |
| 1165 | |
| 1166 | def test_update(self): |
| 1167 | key, msg = random.randbytes(16), random.randbytes(16) |