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

Method hmac_new_by_name

Lib/test/test_hmac.py:395–398  ·  view source on GitHub ↗
(self, key, msg=None, *, hashname)

Source from the content-addressed store, hash-verified

393class OpenSSLAssertersMixin(ThroughOpenSSLAPIMixin, AssertersMixin):
394
395 def hmac_new_by_name(self, key, msg=None, *, hashname):
396 self.assertIsInstance(hashname, str)
397 openssl_func = getattr(_hashlib, f"openssl_{hashname}")
398 return self.hmac_new(key, msg, digestmod=openssl_func)
399
400 def hmac_digest_by_name(self, key, msg=None, *, hashname):
401 self.assertIsInstance(hashname, str)

Callers

nothing calls this directly

Calls 3

getattrFunction · 0.85
assertIsInstanceMethod · 0.80
hmac_newMethod · 0.45

Tested by

no test coverage detected