A hash function is an encryption algorithm that allows you to map a set of data of arbitrary size into a corresponding numerical value of predetermined size, also called a hash value (or digest). The particularity of hash functions is that they are not invertible (also known as one-way or trapdoor functions).
Unlike the encrypting process, in which it is always possible to pass from the ciphertext to the original plaintext by applying the decryption key, in the case of hash functions, it is not possible to obtain the original dataset starting from the hash value, even knowing the algorithm that has generated it. By virtue of this property, hash functions are commonly used to verify data integrity, as hash values are very sensitive to changes in input data.
Even a small change in the input data causes the generation of a completely...