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

Method check_hexdigest

Lib/test/test_hmac.py:199–203  ·  view source on GitHub ↗

Check the HMAC digest of 'h' and its size.

(self, h, hexdigest, digest_size)

Source from the content-addressed store, hash-verified

197 self.assertEqual(h.block_size, block_size)
198
199 def check_hexdigest(self, h, hexdigest, digest_size):
200 """Check the HMAC digest of 'h' and its size."""
201 self.assertEqual(len(h.digest()), digest_size)
202 self.assertEqual(h.digest(), binascii.unhexlify(hexdigest))
203 self.assertEqual(h.hexdigest().upper(), hexdigest.upper())
204
205
206class AssertersMixin(CreatorMixin, DigestMixin, ObjectCheckerMixin):

Callers 2

check_objectMethod · 0.95
hmac_new_feedMethod · 0.80

Calls 5

lenFunction · 0.85
assertEqualMethod · 0.45
digestMethod · 0.45
upperMethod · 0.45
hexdigestMethod · 0.45

Tested by

no test coverage detected