Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
PHP >= 5.5 具有password_hash简化散列密码的功能。通常他们会推荐类似的东西:
password_hash
pasword_hash($password,PASSWORD_DEFAULT)
利用任何改进是未来的版本。目前默认算法是bcrypt.
bcrypt
问题是:
谢谢
在此处查看手册
标识符,例如$2y$,标识使用了哪个哈希,因此在将来添加其他算法时允许兼容性。
$2y$
对于散列,更新它的唯一方法应该是在用户输入密码后,您可以使用新算法重新创建散列。