(data=b'', *, usedforsecurity=True, string=None)
| 980 | def _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 |