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

Function _block_hashlib_hash_constructor

Lib/test/support/hashlib_helper.py:980–984  ·  view source on GitHub ↗

Block explicit public constructors.

(name)

Source from the content-addressed store, hash-verified

978
979
980def _block_hashlib_hash_constructor(name):
981 """Block explicit public constructors."""
982 def dummy(data=b'', *, usedforsecurity=True, string=None):
983 raise ValueError(f"blocked explicit public hash name: {name}")
984 return _make_hash_constructor_blocker(name, dummy, 'hashlib')
985
986
987def _block_openssl_hash_constructor(name):

Callers 1

block_algorithmFunction · 0.85

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…