BLUE
PHP 7.4.33
Path:
/usr/lib/python3.10/test/support
Run
Logout
Edit File
Size: 1.86 KB
Close
/usr/lib/python3.10/test/support/hashlib_helper.py
Text
Base64
import functools import hashlib import unittest try: import _hashlib except ImportError: _hashlib = None def requires_hashdigest(digestname, openssl=None, usedforsecurity=True): """Decorator raising SkipTest if a hashing algorithm is not available The hashing algorithm could be missing or blocked by a strict crypto policy. If 'openssl' is True, then the decorator checks that OpenSSL provides the algorithm. Otherwise the check falls back to built-in implementations. The usedforsecurity flag is passed to the constructor. ValueError: [digital envelope routines: EVP_DigestInit_ex] disabled for FIPS ValueError: unsupported hash type md4 """ def decorator(func_or_class): if isinstance(func_or_class, type): setUpClass = func_or_class.__dict__.get('setUpClass') if setUpClass is None: def setUpClass(cls): super(func_or_class, cls).setUpClass() setUpClass.__qualname__ = func_or_class.__qualname__ + '.setUpClass' setUpClass.__module__ = func_or_class.__module__ else: setUpClass = setUpClass.__func__ setUpClass = classmethod(decorator(setUpClass)) func_or_class.setUpClass = setUpClass return func_or_class @functools.wraps(func_or_class) def wrapper(*args, **kwargs): try: if openssl and _hashlib is not None: _hashlib.new(digestname, usedforsecurity=usedforsecurity) else: hashlib.new(digestname, usedforsecurity=usedforsecurity) except ValueError: raise unittest.SkipTest( f"hash digest '{digestname}' is not available." ) return func_or_class(*args, **kwargs) return wrapper return decorator
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 12
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
__pycache__
DIR
-
drwxr-xr-x
2026-03-12 07:02:02
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
bytecode_helper.py
1.61 KB
lrw-r--r--
2026-03-03 11:56:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
hashlib_helper.py
1.86 KB
lrw-r--r--
2026-03-03 11:56:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
import_helper.py
7.55 KB
lrw-r--r--
2026-03-03 11:56:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
interpreters.py
5.69 KB
lrw-r--r--
2026-03-03 11:56:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
logging_helper.py
916 B
lrw-r--r--
2026-03-03 11:56:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
os_helper.py
19.50 KB
lrw-r--r--
2026-03-03 11:56:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
script_helper.py
11.14 KB
lrw-r--r--
2026-03-03 11:56:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
socket_helper.py
11.21 KB
lrw-r--r--
2026-03-03 11:56:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
testresult.py
5.86 KB
lrw-r--r--
2026-03-03 11:56:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
threading_helper.py
6.49 KB
lrw-r--r--
2026-03-03 11:56:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
warnings_helper.py
6.44 KB
lrw-r--r--
2026-03-03 11:56:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
__init__.py
69.93 KB
lrw-r--r--
2026-03-03 11:56:32
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).