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

Function _get_digest_constructor

Lib/hmac.py:39–49  ·  view source on GitHub ↗
(digest_like)

Source from the content-addressed store, hash-verified

37
38
39def _get_digest_constructor(digest_like):
40 if callable(digest_like):
41 return digest_like
42 if isinstance(digest_like, str):
43 def digest_wrapper(d=b''):
44 import hashlib
45 return hashlib.new(digest_like, d)
46 else:
47 def digest_wrapper(d=b''):
48 return digest_like.new(d)
49 return digest_wrapper
50
51
52class HMAC:

Callers 2

_init_oldMethod · 0.85
_compute_digest_fallbackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…