Posted by Shabam on 09/21/05 12:49
> It depends on the PHP version you are using. PHP>=4.3.0 and PHP 5.x has
this
> standard. When you have a version that is outdated:
>
>
> *****from the comments of http://nl2.php.net/sha1 *****
>
> install the mhash library (see http://mhash.sourceforge.net)
>
> then, sha1 can be implemented as follows:
>
> function sha1($hash_source) {
> $hash = mhash(MHASH_SHA1, $hash_source);
> $hex_hash = bin2hex($hash);
> return $hex_hash;
> }
> *********** end of the comments ******
>
> But you better update to the latest version anyway.
Do I need to install mhash to php? I don't see it in my phpinfo.
[Back to original message]
|