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

Method __init

Lib/hmac.py:89–102  ·  view source on GitHub ↗
(self, key, msg, digestmod)

Source from the content-addressed store, hash-verified

87 self.__init(key, msg, digestmod)
88
89 def __init(self, key, msg, digestmod):
90 if _hashopenssl and isinstance(digestmod, (str, _functype)):
91 try:
92 self._init_openssl_hmac(key, msg, digestmod)
93 return
94 except _hashopenssl.UnsupportedDigestmodError: # pragma: no cover
95 pass
96 if _hmac and isinstance(digestmod, str):
97 try:
98 self._init_builtin_hmac(key, msg, digestmod)
99 return
100 except _hmac.UnknownHashError: # pragma: no cover
101 pass
102 self._init_old(key, msg, digestmod)
103
104 def _init_openssl_hmac(self, key, msg, digestmod):
105 self._hmac = _hashopenssl.hmac_new(key, msg, digestmod=digestmod)

Callers 1

__init__Method · 0.95

Calls 3

_init_openssl_hmacMethod · 0.95
_init_builtin_hmacMethod · 0.95
_init_oldMethod · 0.95

Tested by

no test coverage detected