Wednesday, November 12, 2008

Question: How can we encrypt the username and password using PHP?

Question: How can we encrypt the username and password using PHP?

Answer:
PHP has an md5 function that would normally suffice. Also‚ since the password function in mysql can change between versions‚ using PHP’s md5 function would be better here. As an aside‚ concatonating the record id (or something else handy) before hashing will stop different users with the same password getting the same hash.

No comments:

security header validate

  HTTP Security Headers Check Tool - Security Headers Response (serpworx.com)