Fix varios ext/hash algorithms
commit182995353f24c7ed1305077d436c8728cc3cc750
authorSara Golemon <sgolemon@fb.com>
Wed, 24 Apr 2013 16:01:47 +0000 (24 09:01 -0700)
committerSara Golemon <sgolemon@fb.com>
Thu, 25 Apr 2013 07:50:00 +0000 (25 00:50 -0700)
tree269fb2890abfda1265fd9b564b76b2c02636169f
parent05b6e5be7d0e67471777b5f54e4caa5758e31ba0
Fix varios ext/hash algorithms

Added sha224 algo (derivative of sha256)
Added fnv132, fnv1a32, fnv164, fnv1a64 algos
Fixed tiger* finalization (endianess was backwards)

I fixed the endianness of tiger*,* and added Zend's
unit tests, but I forgot to update these tests.
15 files changed:
hphp/runtime/ext/ext_hash.cpp
hphp/runtime/ext/hash/hash_fnv1.cpp [new file with mode: 0644]
hphp/runtime/ext/hash/hash_fnv1.h [copied from hphp/runtime/ext/hash/hash_sha.h with 68% similarity]
hphp/runtime/ext/hash/hash_sha.cpp
hphp/runtime/ext/hash/hash_sha.h
hphp/runtime/ext/hash/hash_tiger.cpp
hphp/test/test_ext_hash.cpp
hphp/test/zend/good/ext-hash/fnv132.php [moved from hphp/test/zend/bad/ext-hash/fnv132.php with 99% similarity]
hphp/test/zend/good/ext-hash/fnv132.php.expectf [moved from hphp/test/zend/bad/ext-hash/fnv132.php.expectf with 100% similarity]
hphp/test/zend/good/ext-hash/fnv164.php [moved from hphp/test/zend/bad/ext-hash/fnv164.php with 99% similarity]
hphp/test/zend/good/ext-hash/fnv164.php.expectf [moved from hphp/test/zend/bad/ext-hash/fnv164.php.expectf with 100% similarity]
hphp/test/zend/good/ext-hash/sha224.php [moved from hphp/test/zend/bad/ext-hash/sha224.php with 85% similarity]
hphp/test/zend/good/ext-hash/sha224.php.expectf [moved from hphp/test/zend/bad/ext-hash/sha224.php.expectf with 100% similarity]
hphp/test/zend/good/ext-hash/tiger.php [moved from hphp/test/zend/bad/ext-hash/tiger.php with 98% similarity]
hphp/test/zend/good/ext-hash/tiger.php.expectf [moved from hphp/test/zend/bad/ext-hash/tiger.php.expectf with 100% similarity]