I\'ve been reading Stack Overflow questions for about 15 minutes now and every single one seems to contradict the previous one I read. Bcrypt, SHA1, MD5, and so on. I currently
Use MD5, SHA1 or whatever encryption you want with a SALT
.
For this example, I'm just going to use MD5 for explanation sake.
So user chooses a password, store that in $password for instance.
Now create a salt that's specific to your application.
$salt = 'my very own salt'; // or maybe make a random string for your salt
Then do
$more_difficult_password = md5($salt . $password);
This way people can't use dictionary attacks by just googling your MD5 string if it ever got compromised somehow.