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

Method assert_hmac_new_by_name

Lib/test/test_hmac.py:291–302  ·  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

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