From:             robert at bsd dot hu
Operating system: OpenBSD
PHP version:      Irrelevant
PHP Bug Type:     mhash related
Bug description:  Returns zeros instead of the hash

Description:
------------
Configure arguments:
--with-apxs=/usr/sbin/apxs  --without-mysql  --enable-xml  --enable-wddx 
--enable-cli  --with-iconv=/usr/local  --with-gettext=/usr/local 
--enable-dio  --with-pear=/var/www/pear  --enable-bcmath  --enable-session
 --enable-trans-sid  --enable-calendar  --enable-ctype  --enable-ftp 
--with-pcre-regex  --with-posix  --enable-sockets  --enable-sysvsem 
--enable-sysvshm  --enable-yp  --enable-exif --enable-shared 
--disable-static  --disable-rpath  --with-config-file-path=/var/www/conf 
--enable-inline-optimization  --with-pic --with-openssl  --with-zlib
--prefix='/usr/local' --sysconfdir='/etc' --without-bz2 --without-curl
--disable-dba --disable-dbase --disable-dbx --disable-dom
--disable-filepro --without-gd --without-xpm-dir --without-ttf 
--without-freetype-dir --without-gmp --without-imap --without-kerberos
--without-ldap --without-mcrypt --with-mhash=shared,/usr/local
--without-mysql --without-ncurses --without-odbc --without-pdflib
--without-pgsql --disable-shmop --without-snmp --without-sybase-ct
--without-xmlrpc --disable-xslt --enable-shared  --disable-static 
--disable-rpath

Mhash library:
version: 0.9.1
209:-lmhash.2.0 => /usr/local/lib/libmhash.so.2.0




Reproduce code:
---------------
<?php
 $input = "what do ya want for nothing?";
 $hash = mhash(MHASH_MD5, $input);
 echo "The hash is " . bin2hex($hash) . "<br />\n";
 $hash = mhash(MHASH_MD5, $input, "Jefe");
 echo "The hmac is " . bin2hex($hash) . "<br />\n";
?>

Expected result:
----------------
The correct hash.

Actual result:
--------------
The hash is 00000000000000000000000000000000
The hmac is 00000000000000000000000000000000


-- 
Edit bug report at http://bugs.php.net/?id=30983&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30983&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=30983&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=30983&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=30983&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=30983&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=30983&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=30983&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=30983&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=30983&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=30983&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=30983&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=30983&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=30983&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30983&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=30983&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=30983&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=30983&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30983&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30983&r=mysqlcfg

Reply via email to