MCPcopy Create free account
hub / github.com/python/cpython / assert_hmac_hexdigest_by_name

Method assert_hmac_hexdigest_by_name

Lib/test/test_hmac.py:338–347  ·  view source on GitHub ↗

Check a HMAC digest computed by hmac_digest_by_name().

(
        self, key, msg, hexdigest, hashname, digest_size
    )

Source from the content-addressed store, hash-verified

336 )
337
338 def assert_hmac_hexdigest_by_name(
339 self, key, msg, hexdigest, hashname, digest_size
340 ):
341 """Check a HMAC digest computed by hmac_digest_by_name()."""
342 self.assertIsInstance(hashname, str)
343 self.check_hmac_hexdigest(
344 key, msg, hexdigest, digest_size,
345 hmac_digest_func=self.hmac_digest_by_name,
346 hmac_digest_kwds={'hashname': hashname},
347 )
348
349 def check_hmac_hexdigest(
350 self, key, msg, hexdigest, digest_size,

Callers 1

assert_hmacMethod · 0.95

Calls 2

check_hmac_hexdigestMethod · 0.95
assertIsInstanceMethod · 0.80

Tested by

no test coverage detected