Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP

Soumodeep Bhowmick
Soumodeep Bhowmick
4,062 Points

Can anyone explain me the process of password hashing in PHP?

How to generate salt and a hash?

Jesse Rushlow
Jesse Rushlow
Courses Plus Student 2,828 Points

Have a look at the PHP Documentation

http://us3.php.net/manual/en/function.password-hash.php

General concept:

$hash = password_hash("rasmuslerdorf", PASSWORD_DEFAULT);

It would be a good idea to validate and escape any user supplied password before creating a hash. Don't want malicious code getting in the way of your program...

Stack Exchange also has a wealth of information regarding hashing passwords and general password security for php. As does the php documentation.