This module exposes a common interface to many different secure hash and message digest algorithms. The difference in those two terms is simply historical: older algorithms were called digests, while the modern algorithms are called hashes.
In general, a hash function is any function that can be used to map data of an arbitrary size to data of a fixed size. It is a one-way type of encryption, in that it is not expected to be able to recover the message given its hash.
There are several algorithms that can be used to calculate a hash, so let's see how to find out which ones are supported by your system (note, your results might be different than mine):
>>> import hashlib
>>> hashlib.algorithms_available
{'SHA512', 'SHA256', 'shake_256', 'sha3_256', 'ecdsa-with-SHA1',
'DSA-SHA', 'sha1&apos...