note 55737 added to ref.mhash

From: Date: Thu, 11 Aug 2005 23:43:03 +0000
Subject: note 55737 added to ref.mhash
Groups: php.notes 
Request: Send a blank email to php-notes+get-93469@lists.php.net to get a copy of this message
Since it seems that the tiger hash bug has been labeled "bogus" here is a fix to give a correct result. I'm not a binary expert so if you come up with a better fix please let us know. Just do your MHASH_TIGER as normal then send the unaltered binary into tigerfix and you get a proper HEX return. function tigerfix ($binary_hash) { $my_split = str_split($binary_hash,8); $my_tiger =""; foreach($my_split as $key => $value) { $my_split[$key] = strrev($value); $my_tiger .= $my_split[$key]; } $my_tiger_hex = bin2hex($my_tiger); return $my_tiger_hex; } ---- Manual Page -- http://www.php.net/manual/en/ref.mhash.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+55737 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55737&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55737&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55737&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55737&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55737&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55737&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+55737&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#93469) next »