Re: SHA-1 support
| From: | Markus Fischer | Date: | Sun, 17 Feb 2002 16:04:42 +0000 |
| Subject: | Re: SHA-1 support | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-80115@lists.php.net to get a copy of this message | ||
On Sun, Feb 17, 2002 at 04:23:24PM +0100, André Næss wrote :
> I can't seem to find support for the SHA-1 algorithm in PHP. I did find the
> mhash() function, but not only is this function very badly documented (no
> list of what hashes it supports!), [...]
http://www.php.net/manual/en/ref.mhash.php
"Here is a list of hashes which are currently supported by
mhash." (with a list including SHA1).
It also states it's possible this documentation is outdated
(which I didn't verify).
SHA1 is as easy as writing:
$sha1 = mhash(MHASH_SHA1, "yoursecretdata");
And I never used it before or any mhash() function so it's
not really hard to achive this.
mhash is available for nearly every distribution as a package
and even if not, it's not hard to install.
I can see a possible point with a dedicated sha1() function,
but I don't see one in saying that mhash() is badly
documented (even if it was, it's very easy to find the right
information within seconds). The later case would vindicate a
documentation report.
- Markus
--
Please always Cc to me when replying to me on the lists.
GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc