note 45625 deleted from function.sha1 by tomsommer
| From: | tomsommer@php.net | Date: | Mon, 13 Sep 2004 22:00:53 +0000 |
| Subject: | note 45625 deleted from function.sha1 by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-76643@lists.php.net to get a copy of this message | ||
Note Submitter: samato at mbigroup dot it
----
If you:
-have PHP 4 < 4.3.0
-have openssl installed
and you need sha1
you can define:
<?php
function sha1($myString) {
// use the /usr/bin/openssl to calculate sha1...
return exec("/bin/echo -n \"" . $myString . "\" | /usr/bin/openssl
dgst -sha1 -hex");
}
?>
Regards,
Sandro