The following are both SHA256 hashes of an empty string, generated with PHP's crypt function.
$5$fooooooooooooooo$Y6IVN.cYkABQ4h8dCR0zL/rJoRx09pwMoGaYST9HqDD
$5$baaaaaaaaaaaaaar$C84IKQdPMG8qvnnckGZsyBJWKHuaSD0tqcmyueHI0GA
Each was generated with a different 16 bytes of salt present in the hash. Is there a way to merely test that they are hashes of the same thing, without knowing what that thing was?
Yes, if you hash the same input with the same function, you will always get the same result. This follows from the fact that it is a hash-function.
While there are many types of two-way encryption, hash functions are one-way encryption, which makes them even tougher codes to crack.
Furthermore, a one-way hash function is designed in such a way that it is hard to reverse the process, that is, to find a string that hashes to a given value (hence the name one-way.) A good hash function also makes it hard to find two strings that would produce the same hash value.
You can't reverse hashing functions: they are not a form of encryption. That's why hashes are always the same length regardless of the input length: they throw away information in order to generate a (hopefully) unique value from the input.
No. The strings become completely unique once the salts are added, and there is no way of reversing a hashed string.
No. You could only do that if the same salt was used.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With