我正在使用 php for visual studio ,我正在创建一个注册表单。当我正要使用password_hash
内置 PHP 函数,它向我展示了以下评论:
但是在执行函数时它工作正常。
在 PHP manual 中没有关于它被弃用的信息。 .
(PHP 5 >= 5.5.0, PHP 7)
password_hash — Creates a password hash
我错过了什么吗?
最佳答案
这似乎是对 password_hash() documentation 的误读。 ,其中指出:
Warning The salt option has been deprecated as of PHP 7.0.0. It is now preferred to simply use the salt that is generated by default.
和
Caution It is strongly recommended that you do not generate your own salt for this function. It will create a secure salt automatically for you if you do not specify one.
As noted above, providing the salt option in PHP 7.0 will generate a deprecation warning. Support for providing a salt manually may be removed in a future PHP release.
放心,
password_hash()
没有被弃用(在撰写本文时)。
关于php - 自 PHP 7.0.0 起不推荐使用 password_hash?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48893079/