note 36623 added to function.sha1
| From: | andreas at schmeiler dot de | Date: | Thu, 16 Oct 2003 15:50:50 +0000 |
| Subject: | note 36623 added to function.sha1 | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-58702@lists.php.net to get a copy of this message | ||
To use the sha1 function in php versions <4.3 do the following:
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;
}
----
Manual Page -- http://www.php.net/manual/en/function.sha1.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+36623
Delete -- http://master.php.net/manage/user-notes.php?action=delete+36623&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+36623&report=yes
Search -- http://master.php.net/manage/user-notes.php