bcrypt 是目前最安全的密码存储模式 php中的函数crypt 验证hash_equals
$user_input = ‘1234563’;
$hashed_password = crypt(‘123456′,(md5(time().’3355555555555566666666666666666666’)));
if (hash_equals($hashed_password, crypt($user_input, $hashed_password))) {
echo “Password verified!”;
}else{
echo “Faild !”;
}