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

Method assert_hmac_new

Lib/test/test_hmac.py:277–288  ·  view source on GitHub ↗

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

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

Source from the content-addressed store, hash-verified

275 )
276
277 def assert_hmac_new(
278 self, key, msg, hexdigest, digestmod, hashname, digest_size, block_size
279 ):
280 """Check that HMAC(key, msg) == digest.
281
282 This test uses the `hmac_new()` method to create HMAC objects.
283 """
284 self.check_hmac_new(
285 key, msg, hexdigest, hashname, digest_size, block_size,
286 hmac_new_func=self.hmac_new,
287 hmac_new_kwds={'digestmod': digestmod},
288 )
289
290 def assert_hmac_new_by_name(
291 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