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

Method __init

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

Source from the content-addressed store, hash-verified

77 self.__init(key, msg, digestmod)
78
79 def __init(self, key, msg, digestmod):
80 if _hashopenssl and isinstance(digestmod, (str, _functype)):
81 try:
82 self._init_openssl_hmac(key, msg, digestmod)
83 return
84 except _hashopenssl.UnsupportedDigestmodError: # pragma: no cover
85 pass
86 if _hmac and isinstance(digestmod, str):
87 try:
88 self._init_builtin_hmac(key, msg, digestmod)
89 return
90 except _hmac.UnknownHashError: # pragma: no cover
91 pass
92 self._init_old(key, msg, digestmod)
93
94 def _init_openssl_hmac(self, key, msg, digestmod):
95 self._hmac = _hashopenssl.hmac_new(key, msg, digestmod=digestmod)

Callers 1

__init__Method · 0.95

Calls 4

_init_openssl_hmacMethod · 0.95
_init_builtin_hmacMethod · 0.95
_init_oldMethod · 0.95
isinstanceFunction · 0.85

Tested by

no test coverage detected