Possible Duplicate:
Best way to encode passwords in PHP
I’ve been reading a lot of things about password and email hashing and I am not quiet sure I figure out what is the best method. It’s clear that md5 and SHA are outdated and pretty useless but when it comes to all the crypt’s, mcrypt_encrypt, hash(), etc.:
- which one is an effective way of secure PASSWORDS AND EMAILS nowadays?;(maybe A BEST way?)
- can I use the same method for both?;
Really appreciated if someone could give me some advise.
Have a look at this blog. It as good information about password hashing.
http://blog.ircmaxell.com/search/label/Password-Hashing
The author also has a password hashing library, which only uses quality, vetted algorithms.
That note aside, you should use bcrypt, or PBKDF2 for password hashing.
As for email encryption, PGP/GPG is your best bet for cross compatible/supported email encryption.