From:             
Operating system: Linux
PHP version:      5.3.8
Package:          hash related
Bug Type:         Bug
Bug description:Tiger hash output byte order

Description:
------------
The testtiger program prints its hashes with each 8-byte chunk byte-swapped
(perhaps arch-dependent?).  The "24f0130c63ac9332..." hash of the tiger*,3
family would be printed "3293ac630c13f024..." in MSB-first representation,
e.g. as given on Wikipedia's example output.

Perl's Digest::Tiger also uses the MSB-first format:
http://search.cpan.org/~clintdw/Digest-Tiger-0.03/Tiger.pm#NOTE

The lack of MSB-first order potentially impacts interoperability, but
changing the output of "tiger192,3" would break BC with anyone who doesn't
have interop problems.

This bug has been observed in php 5.2.6 as well.

Test script:
---------------
<?php echo hash('tiger192,3', ''), "\n"; ?>


Expected result:
----------------
3293ac630c13f0245f92bbb1766e16167a4e58492dde73f3

Actual result:
--------------
24f0130c63ac933216166e76b1bb925ff373de2d49584e7a

-- 
Edit bug report at https://bugs.php.net/bug.php?id=60221&edit=1
-- 
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=60221&r=trysnapshot54
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=60221&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=60221&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=60221&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=60221&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=60221&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=60221&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=60221&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=60221&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=60221&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=60221&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=60221&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=60221&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=60221&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=60221&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=60221&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=60221&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=60221&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=60221&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=60221&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=60221&r=mysqlcfg

Reply via email to