Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does PHP hash() support WHIRLPOOL by default?

Does PHP's hash function supported WHIRLPOOL by default? I believe it does but I wanted to ask to be sure.

like image 578
Brent Avatar asked Feb 25 '10 22:02

Brent


2 Answers

Yes, hash() in PHP should support Whirlpool by default. Try calling:

print_r(hash_algos());

to see the list of supported hashing methods.

http://www.php.net/manual/en/function.hash-algos.php

like image 148
pako Avatar answered Oct 05 '22 23:10

pako


Yes. And your code might look something like this:

$myHash = hash( 'whirlpool', $salt . $password );

More details can be found in this excellent article: PHP Password Security

like image 20
james.garriss Avatar answered Oct 06 '22 00:10

james.garriss