PHP, hash()
As of PHP 5.1.2 a new set of hashing functions is available (as default). The new function hash() supports a new range of hasing methods.
Theese are the supported types on my FreeBSD box:
print_r(hash_algos());
Array
(
[0] => md2
[1] => md4
[2] => md5
[3] => sha1
[4] => sha256
[5] => sha384
[6] => sha512
[7] => ripemd128
[8] => ripemd160
[9] => whirlpool
[10] => tiger128,3
[11] => tiger160,3
[12] => tiger192,3
[13] => tiger128,4
[14] => tiger160,4
[15] => tiger192,4
[16] => snefru
[17] => gost
[18] => adler32
[19] => crc32
[20] => crc32b
[21] => haval128,3
[22] => haval160,3
[23] => haval192,3
[24] => haval224,3
[25] => haval256,3
[26] => haval128,4
[27] => haval160,4
[28] => haval192,4
[29] => haval224,4
[30] => haval256,4
[31] => haval128,5
[32] => haval160,5
[33] => haval192,5
[34] => haval224,5
[35] => haval256,5
)
According to the manual the functions is available as a default, but I had to install the /usr/ports/security/pecl-hash port in order to get them to work, I guess that has something to do with the FreeBSD port, and not PHP.
Post new comment