PHP,PHPMYADMIN和MYSQL中可用的密码哈希功能
我想在PHP中使用哈希密码,然后将结果发送到MySQL。
我可能会不时地使用phpmyadmin中的可用哈希功能来更新/重置密码。
我过去曾经为此使用md5
。作为PHP,PHPMyAdmin和MySQL的可用性。 但是,由于安全问题,MD5不再是一种选择。 我研究了sha1
,这也不是一个选项。 sha2
似乎在phpmyadmin中没有可用,因此无法轻松重置密码。 我看到的一种版本的phpmyadmin使用了password_hash
,但在另一台服务器上没有可用,因此这是一个问题。另一个问题是,每次运行该功能可能是由于随机盐而运行时,它似乎会产生不同的输出。
我可以从PHP调用密码哈希功能,也可以在PHPMyAdmin和MySQL中使用?
基本上,我应该用什么替换md5
?
I want to hash passwords in PHP then send the result to MySQL.
From time to time I might want to use the available hashing functions in PHPMyAdmin to update/reset passwords.
I used to use MD5
for this in the past. As its available in PHP, PHPMyAdmin and in MySQL.
However MD5 is no longer an option due to security concerns.
I looked into SHA1
and that is no longer an option either.SHA2
does not seem to be available in PHPMyAdmin so that wont work for easy password resetting.
One version of PHPMyAdmin I saw used password_hash
but it wasn't available on another server so that is one issue. Another issue is it seems to produce a different output each time the function is run probably because of a random salt.
Is there a password hashing function that I can call from PHP, that will also be available in PHPMyAdmin and in MySQL as well?
Basically what should I replace MD5
with?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在所有3个领域都有类似的哈希功能的日子已经一去不复返了。
我喜欢在所有3个领域的MD5均为PHP,PHPMYADMIN和MYSQL。由于
password_hash
是使用PHP哈希密码的推荐方法,因此我将不得不使用它。对于phpmyadmin中的重置密码,我可以允许
md5
hash,并将应用程序更新为phppassword> password_hash
下次用户登录与WordPress的方式相似。 [如果有人发现这种方法有问题,我想知道]Gone are the days when there is a similar hashing function in all 3 areas.
I liked how MD5 was available in all 3 areas being PHP, PHPMyAdmin and MySQL. Since
password_hash
is the recommended way to hash passwords with PHP I will have to use that.For resetting passwords in PHPMyAdmin I may allow
MD5
hash and have the application update it to phppassword_hash
next time the user logs in similar to how Wordpress did it. [If anyone sees a problem with this method I would like to be made aware]