You are building a web application where the security of user data is paramount. Which password hashing algorithm would be most appropriate to use in PHP?

  • password_hash()
  • md5()
  • sha1()
  • bcrypt()
bcrypt() is the recommended choice for secure password hashing in PHP. It's a one-way hashing algorithm with salting, making it extremely resistant to brute-force and rainbow table attacks. In contrast, md5() and sha1() are outdated and less secure. password_hash() is a more recent option, but it's best used with bcrypt().
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *