Friday, May 10, 2019

encryption - Best way encrypt password php (in 2017)




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




$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 ?



Thank you




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


Answer



The password hash function in combination with password verify



https://secure.php.net/manual/en/function.password-hash.php
https://secure.php.net/manual/en/function.password-verify.php


No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...