Hashing

Hashing is a transformation of variable-sized input data to a fixed-size hexadecimal output. This output is often called a hash, or a digest.

Perhaps the most important thing about hashing is that it only works in one direction. It is easy to take arbitrary input and produce a hash, but it is difficult to take a hash and produce the original input. This property of "one-way-ness" is what makes hashing so useful.

Another essential property of hashing is that even the smallest change in the input data can greatly change the resulting digest. Because of this, hashing is typically used to verify the integrity of some input data.

There are many common hashing algorithms, often differing in the length of the digest, like:

Warning

Note that MD5 is no longer considered secure because it has become possible to obtain the original input due to certain flaws in the algorithm.

Common applications of hashes include:


Relevant Note(s): Salting