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

Method assert_hmac_new_by_name

Lib/test/test_hmac.py:290–301  ·  view source on GitHub ↗

Check that HMAC(key, msg) == digest. This test uses the `hmac_new_by_name()` method to create HMAC objects.

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

Source from the content-addressed store, hash-verified

288 )
289
290 def assert_hmac_new_by_name(
291 self, key, msg, hexdigest, hashname, digest_size, block_size
292 ):
293 """Check that HMAC(key, msg) == digest.
294
295 This test uses the `hmac_new_by_name()` method to create HMAC objects.
296 """
297 self.check_hmac_new(
298 key, msg, hexdigest, hashname, digest_size, block_size,
299 hmac_new_func=self.hmac_new_by_name,
300 hmac_new_kwds={'hashname': hashname},
301 )
302
303 def check_hmac_new(
304 self, key, msg, hexdigest, hashname, digest_size, block_size,

Callers 1

assert_hmacMethod · 0.95

Calls 1

check_hmac_newMethod · 0.95

Tested by

no test coverage detected