加密密码 php 的最佳方式(2017 年)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/43864379/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-26 02:55:09  来源:igfitidea点击:

Best way encrypt password php (in 2017)

phpencryptionpassword-encryption

提问by Rocstar

In my website I use md5to crypt password user in my database (and store session user)

在我的网站中,我用来md5在我的数据库中加密密码用户(并存储会话用户)

$pswUser = md5($_POST["password"]);

But I have just been told that this way of encrypting has become obsolete

但是我刚刚被告知这种加密方式已经过时了

I did some research to find out how to do it but most of the posts dates from two or three years ago So what is the best way to encrypt password in 2017 ?

我做了一些研究以找出如何做到这一点,但大多数帖子都是两三年前的 那么在 2017 年加密密码的最佳方法是什么?

Thank you

谢谢

Isn't duplicate discussion ... Secure hash and salt for PHP passwords=> 2009 ...

不是重复讨论...... PHP 密码的安全哈希和盐=> 2009 ...