mirror of
https://github.com/php/php-src.git
synced 2024-09-24 03:17:26 +00:00
- hexlen is 2*digestlen
This commit is contained in:
parent
4c61cf6f4c
commit
99c8d42a7b
@ -35,7 +35,7 @@ php_hash_ops php_hash_md5_ops = {
|
||||
PHP_HASH_API void make_digest(char *md5str, unsigned char *digest)
|
||||
{
|
||||
php_hash_bin2hex(md5str, digest, 16);
|
||||
md5str[16] = '\0';
|
||||
md5str[32] = '\0';
|
||||
}
|
||||
|
||||
/* {{{ proto string md5(string str, [ bool raw_output])
|
||||
|
@ -90,7 +90,7 @@ php_hash_ops php_hash_sha1_ops = {
|
||||
PHP_HASH_API void make_sha1_digest(char *sha1str, unsigned char *digest)
|
||||
{
|
||||
php_hash_bin2hex(sha1str, digest, 20);
|
||||
sha1str[20] = '\0';
|
||||
sha1str[40] = '\0';
|
||||
}
|
||||
|
||||
/* {{{ proto string sha1(string str [, bool raw_output])
|
||||
|
Loading…
Reference in New Issue
Block a user