Uh? Of course not. It will spit out exactly the same hash every time, given the same input.
How else would you verify that the password matches ?
How else would you verify that the password matches ?
The output of your library's BcryptEncoder.encode(password) includes not only the password hash but information about the algorithm and the salt. That's what you store in your database. That extra information tells the decode function how to decode later on.
See here:
http://stackoverflow.com/questions/6832445/how-can-bcrypt-ha...