gpt4 book ai didi

php - 自 PHP 7.0.0 起不推荐使用 password_hash?

转载 作者:行者123 更新时间:2023-12-02 06:49:21 26 4
gpt4 key购买 nike

我正在使用 php for visual studio ,我正在创建一个注册表单。当我正要使用password_hash内置 PHP 函数,它向我展示了以下评论:

enter image description here

但是在执行函数时它工作正常。

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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com