Teks sumber — English
Terjemahan — Bahasa Indonesia
Any of these may nonetheless be missing or blocked in unusual environments, such as a rare "FIPS compliant" build of Python or when OpenSSL's "FIPS mode" is configured to exclude some algorithms from its default provider. Calling the constructor of an algorithm that is unavailable raises :exc:`ValueError`.
Additional algorithms may also be available if your Python distribution's :mod:`!hashlib` was linked against a build of OpenSSL that provides others. Others *are not guaranteed available* on all installations and will only be accessible by name via :func:`new`. See :data:`algorithms_available`.
Hashlib now uses SHA3 and SHAKE from OpenSSL if it provides it.
For any of the MD5, SHA1, SHA2, or SHA3 algorithms that the linked OpenSSL does not provide we fall back to a verified implementation from the `HACL\* project`_.
Is a generic constructor that takes the string *name* of the desired algorithm as its first parameter. It also exists to allow access to the above listed hashes as well as any other algorithms that your OpenSSL library may offer.
A set containing the names of the hash algorithms that are available in the running Python interpreter. These names will be recognized when passed to :func:`new`. :attr:`algorithms_guaranteed` will always be a subset. The same algorithm may appear multiple times in this set under different names (thanks to OpenSSL).
Function only available when Python is compiled with OpenSSL.
Function now only available when Python is built with OpenSSL. The slow pure Python implementation has been removed.
*n* is the CPU/Memory cost factor, *r* the block size, *p* parallelization factor and *maxmem* limits memory (OpenSSL 1.1.0 defaults to 32 MiB). *dklen* is the length of the derived key in bytes.
OpenSSL
OpenSSL