Search code examples
phpdigestpassword-hash

PHP rewriting password hashing function what algo to use?


I'm rewriting my password hashing function.

It currently uses sha1.

I'm thinking about using sha512.

Am I right to think that sha512 is sha2?

Is this currently the standard for hashing passwords or should I use another hashing algo?


Solution

  • I would suggest using bcrypt to hash passwords.

    This site gives some good background on the issue: http://codahale.com/how-to-safely-store-a-password/