0

Possible Duplicate:
What is the most secure hashing method? (PHP)

I know that there is not a 100% secure hashing system in PHP but can you please let me now what is the best hashing available from following list or anything more in PHP ,right now?

<?php
 $password = ‘SomePassword!’;
 echo ‘md5: ‘ . hash(‘md5’, $password) . ‘<br />’;
 echo ‘sha1: ‘ . hash(‘sha1’, $password) . ‘<br />’;
 echo ‘sha512: ‘ . hash(‘sha512’, $password) . ‘<br />’;
 echo ‘whirlpool: ‘ . hash(‘whirlpool’, $password) . ‘<br />’;
?>

Thanks

Community
  • 1
  • 1
Behseini
  • 6,066
  • 23
  • 78
  • 125
  • 1
    Definitely go for `bcrypt`. Related question: http://stackoverflow.com/questions/401656/secure-hash-and-salt-for-php-passwords – rmobis Dec 21 '12 at 19:56
  • These are all general purpose hashing functions. None of them should be used when there are better ones like *crypt* and its derivatives. – Gumbo Dec 21 '12 at 19:56

1 Answers1

0

bCrypt is probably the best solution to go with at this point in time.

Diemuzi
  • 3,507
  • 7
  • 36
  • 61