So there is a decent amount of “flack” information out there about how to properly and securely save passwords via PHP to your database. I wonder if this is partially because so many years of old out dated answers and discussions have muddled the effectiveness of google, or if to many people it is just not clear or sure. No matter the reasons I decided to share some of the best ways to deal with passwords.
Ten years ago most people would answer this quite quickly with “use MD5” but as that has become less secure, computers have become more powerful, and hacks have become more advanced, using MD5 is not really a good idea. Some now would say use SHA256 or even SHA512, but it’s not just a simple, replace MD5 with a more secure HASH function ether. While currently that might work, it is not very future friendly as ASCII cracking machines get more powerful, in a few years you will be in the same boat. Also this does not solve any of the other issues with more advanced attacks like rainbow tables.

















