diff options
| author | Michael Wallner <mike@php.net> | 2005-11-22 19:17:58 +0000 |
|---|---|---|
| committer | Michael Wallner <mike@php.net> | 2005-11-22 19:17:58 +0000 |
| commit | 4c61cf6f4cb2418cdfb14fe04bc703d7a3f9dcab (patch) | |
| tree | 89027db5ec395d10370d3816689980f87f74e389 /ext/hash/hash_sha.c | |
| parent | 066fb72fdd263147aa6b691fa7d68451f66b3225 (diff) | |
| download | php-git-4c61cf6f4cb2418cdfb14fe04bc703d7a3f9dcab.tar.gz | |
- install extension headers
- make the hash algo registry case insensitive
- "export" inline php_hash_bin2hex
Diffstat (limited to 'ext/hash/hash_sha.c')
| -rw-r--r-- | ext/hash/hash_sha.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/ext/hash/hash_sha.c b/ext/hash/hash_sha.c index 09734acb7f..2d1e4c7a94 100644 --- a/ext/hash/hash_sha.c +++ b/ext/hash/hash_sha.c @@ -89,14 +89,8 @@ php_hash_ops php_hash_sha1_ops = { PHP_HASH_API void make_sha1_digest(char *sha1str, unsigned char *digest) { - int i; - - for (i = 0; i < 20; i++) { - sprintf(sha1str, "%02x", digest[i]); - sha1str += 2; - } - - *sha1str = '\0'; + php_hash_bin2hex(sha1str, digest, 20); + sha1str[20] = '\0'; } /* {{{ proto string sha1(string str [, bool raw_output]) |
