]> granicus.if.org Git - php/commitdiff
md5() and md5_file() should return binary strings when raw_output is
authorAndrei Zmievski <andrei@php.net>
Tue, 16 Aug 2005 19:45:00 +0000 (19:45 +0000)
committerAndrei Zmievski <andrei@php.net>
Tue, 16 Aug 2005 19:45:00 +0000 (19:45 +0000)
set.

ext/standard/md5.c

index d8eb900eb5d0fad4ef3c4f065f40213f653fdc02..2a33588774f6c5e632ed60c980f0af8c263648ba 100644 (file)
@@ -58,7 +58,7 @@ PHP_NAMED_FUNCTION(php_if_md5)
        PHP_MD5Update(&context, arg, arg_len);
        PHP_MD5Final(digest, &context);
        if (raw_output) {
-               RETURN_STRINGL(digest, 16, 1);
+               RETURN_BINARYL(digest, 16, 1);
        } else {
                make_digest(md5str, digest);
                if (UG(unicode)) {
@@ -110,7 +110,7 @@ PHP_NAMED_FUNCTION(php_if_md5_file)
        }
 
        if (raw_output) {
-               RETURN_STRINGL(digest, 16, 1);
+               RETURN_BINARYL(digest, 16, 1);
        } else {
                make_digest(md5str, digest);
                if (UG(unicode)) {