
1 ershisi 2016-04-17 17:32:51 +08:00 我的 脑残办法,库里存两种密文。这样就没那么纠结了 |
2 lianyue 2016-04-17 17:38:23 +08:00 php 的 手动 $2a crypt($password, '$2a$10$'. uniqid(mt_rand(), true) .'$'); 10 = 计算耗时 越大耗时越久 后面是随机数 crypt($password, '$2y$10$'. uniqid(mt_rand(), true) .'$'); 和 password_hash 结果相同 http://php.net/manual/en/function.crypt.php |
3 maxsec 2016-04-17 21:34:20 +08:00 用 hash_mac 吧 |
4 chaegumi OP @lianyue 你这边的$password 一定要保证全部是 ASCII 字符,才不会出错吧。 http://php.net/security/crypt_blowfish.php |
6 chaegumi OP |