I have been reading about password hashing. I really am not great at php. Could anyone tell me how to use Taylor Hornby's password hashing functions as seen here?
You would first include the PHP file, you can see how to do that here. You'd also need to customize the file to match what hash function you'd like to use. sha256 would be a good choice.
You would then run the create_hash
function with your password, and store the returned value to your database.
To verify a password you'd run the validate_password
function, with the hash from the database, and the password the user input. The other two functions you don't need to use, validate_password
and create_hash
run those for you with all the parameters you need.
Cryptography is complex and can be confusing, so it would be a good idea to read up on security a bit before storing confidential information like passwords, since setting this up wrong could mean your passwords are stored insecurely. This page provides some technical details on how to securely store passwords.