From the course: PHP Tips, Tricks, and Techniques

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

User authentication with password hashing

User authentication with password hashing

From the course: PHP Tips, Tricks, and Techniques

User authentication with password hashing

- Hi, I'm David Powers, and welcome to this week's edition of PHP Tips, Tricks, and Techniques, designed to help you become a smarter, more productive PHP developer. If you've been using PHP for some time, you probably know that you should never store passwords in plain text. Quite simply, it's not secure. For a long time, it was recommended that you encrypt passwords with hashing functions, such as MD5 or SHA-1, but as this page and the PHP online documentation explains, MD5 and SHA-1 are unsuitable for passwords. Let's follow this link to see what it says. Hashing algorithms such as MD5, SHA-1, and SHA-256, are designed to be very fast and efficient. With modern techniques and computer equipment, it's become trivial to brute-force the output of these algorithms in order to determine the original input. In other words, it's easy to crack the encrypted password, and this next session goes on to explain what you should do instead. To overcome the problem, PHP 5.5 introduced a native…

Contents