Jemz
xmas tings.
- Aug 6, 2013
- 166
- 17
Can someone please tell me how bcrypt works, I was able to encrypt my data
However when it comes to logging in, the hash just keeps on changing so the hash never matches if you get what I mean.
PHP:
require_once('bcrypt.inc.php');
// And use the new password_hash() function to encrypt using bcrypt with a 10 cost
$string = password_hash($string, PASSWORD_BCRYPT, array("cost" => 10));
// Then return it to the calling function
return $string;
However when it comes to logging in, the hash just keeps on changing so the hash never matches if you get what I mean.