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

Function _block_openssl_hash_constructor

Lib/test/support/hashlib_helper.py:987–991  ·  view source on GitHub ↗

Block explicit OpenSSL constructors.

(name)

Source from the content-addressed store, hash-verified

985
986
987def _block_openssl_hash_constructor(name):
988 """Block explicit OpenSSL constructors."""
989 def dummy(data=b'', *, usedforsecurity=True, string=None):
990 raise ValueError(f"blocked explicit OpenSSL hash name: {name}")
991 return _make_hash_constructor_blocker(name, dummy, 'openssl')
992
993
994def _block_builtin_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…