I’m seeing a lot of answers her that are over-complicating things.
Hashes are typically a fixed size, and much smaller than the data used to generate it. For example, let’s suppose you have a 1-bit hash, just outputs 1 or zero. Let’s say you put in “Hello” and get out a ‘1’. How so you reverse this hash to get back the input? Short answer is you don’t.
Longer answer is that when you hash, you typically lose information, and you can’t get it back from just the hash, and for a given hash, the are generally multiple inputs that can give you the same hash.
A good hash will make hash collisions unlikely for the space input data it’s intended for, and will be irreversible.
If you want a second example, let’s say I add two numbers together and take the remainder of the sum divided by 10. Let’s say the input is 15 and 24. This gives 15+24 = 39, and the remainder after dividing by 10 is 9. Now, given only the number 9 as the output, could you tell me what the inputs were? You can’t because there are infinite ways to add two numbers that end with 9. This is a lot closer to what actual hash functions look like.
Latest Answers