MCPcopy Index your code
hub / github.com/python/cpython / check_update

Method check_update

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

Source from the content-addressed store, hash-verified

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)

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