Quantcast
Channel: password_hash function in php 5.5 - Stack Overflow
Viewing all articles
Browse latest Browse all 3

Answer by deceze for password_hash function in php 5.5

$
0
0

When you hash a password with password_hash, a random salt is being generated, used in the hashing process and prepended to the result. This is precisely for the purpose of avoiding the same passwords resulting in the same hash every single time; to avoid easy generation of rainbow tables. (All terms you should probably google. :))

To verify a hash generated with password_hash you need to use password_verify, which uses the salt embedded in the hash to reproduce and compare the hash from another plaintext password.


Viewing all articles
Browse latest Browse all 3

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>