Hashing was designed as a one-way process i.e. data of any type, size or length can be converted into a fixed-length unique string by placing it through a hashing algorithm.
However, you cannot come up with a unique hash and decipher the input data it represents. So how does hashing work in the real world?
Let's look at a common example.
Hashing Verification Example
When registering with a new website or online service, you may be asked to create a username and password. Now in many cases, websites will not store the password you entered, but instead will opt to store a hash of your password.
But how then are websites that use this approach able to verify future login attempts?
Well, every time you attempt to sign-in to your account, the website or service provider hashes the password you enter and then compares this hash to the hash it already has saved. Only when the two hashes match are you authorized to access your account.