MCPcopy Index your code
hub / github.com/RustPython/RustPython / check_update

Method check_update

Lib/test/test_hmac.py:1200–1210  ·  view source on GitHub ↗
(self, key, chunks)

Source from the content-addressed store, hash-verified

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)

Callers 2

test_updateMethod · 0.95
test_update_largeMethod · 0.95

Calls 7

HMACMethod · 0.95
updateMethod · 0.95
digestMethod · 0.95
hexdigestMethod · 0.95
listClass · 0.85
joinMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected