How it works

Hash is a sort of checksum of data or its fingerprint. Like finger prints are unique for every human being – hash code is unique for every unique message or data array. This feature is used to quickly check large data volumes for changes or updates. It may seem to human eye that there is no change in the message while hashes prove the contrary – someone did work on it.

For example:

Original Message

The quick brown fox jumps over the lazy dog

9e107d9d372bb6826bd81d3542a419d6

Looks identical?

The quick brown fox jumps оver the lazy dog

c6384847658ab31c1d6c7be43571a6e9

As you can see visually messages look alike. Simple replacing of one of the "o" letters to, let's say, Cyrillic "о" won't even hint on change (guess which one was changed!). For such cases hashes come into play – they clearly shows that messages are not identical at the bottom.

Hashing benefits

Hash code typically is smaller of its original plain text. For this reason, to compare two large data volumes for equivalence it compares their checksums, which were calculated using same algorithm for both data arrays. It's a way much faster than comparing every character and every single bit in two data arrays.

Two edge features of hashing – (1) impossibility to get plain text from hash code and (2) unique hash for every new bit of information – are used for authentication and creation of digital signatures.