diff --git a/hphp/test/zend/bad/ext-hash/adler32.php b/hphp/test/zend/bad/ext-hash/adler32.php new file mode 100644 index 000000000..dda14dcff --- /dev/null +++ b/hphp/test/zend/bad/ext-hash/adler32.php @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-hash/adler32.php.expectf b/hphp/test/zend/bad/ext-hash/adler32.php.expectf new file mode 100644 index 000000000..77db1a358 --- /dev/null +++ b/hphp/test/zend/bad/ext-hash/adler32.php.expectf @@ -0,0 +1,7 @@ +00000001 +00620062 +024d0127 +29750586 +90860b20 +8adb150c +97b61069 \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-hash/bug52240.php b/hphp/test/zend/bad/ext-hash/bug52240.php new file mode 100644 index 000000000..fa232faf5 --- /dev/null +++ b/hphp/test/zend/bad/ext-hash/bug52240.php @@ -0,0 +1,10 @@ + \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-hash/bug52240.php.expectf b/hphp/test/zend/bad/ext-hash/bug52240.php.expectf new file mode 100644 index 000000000..c67f750bf --- /dev/null +++ b/hphp/test/zend/bad/ext-hash/bug52240.php.expectf @@ -0,0 +1,3 @@ +string(8) "278af264" +string(8) "278af264" +string(8) "278af264" \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-hash/crc32.php b/hphp/test/zend/bad/ext-hash/crc32.php new file mode 100644 index 000000000..86bb52585 --- /dev/null +++ b/hphp/test/zend/bad/ext-hash/crc32.php @@ -0,0 +1,16 @@ + \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-hash/crc32.php.expectf b/hphp/test/zend/bad/ext-hash/crc32.php.expectf new file mode 100644 index 000000000..2464de89d --- /dev/null +++ b/hphp/test/zend/bad/ext-hash/crc32.php.expectf @@ -0,0 +1,14 @@ +00000000 +6b9b9319 +73bb8c64 +5703c9bf +9693bf77 +882174a0 +96790816 +00000000 +e8b7be43 +352441c2 +20159d7f +4c2750bd +1fc2e6d2 +7ca94a72 \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-hash/fnv132.php b/hphp/test/zend/bad/ext-hash/fnv132.php new file mode 100644 index 000000000..2b5810d4b --- /dev/null +++ b/hphp/test/zend/bad/ext-hash/fnv132.php @@ -0,0 +1,195 @@ + /\\../\\", "995fa9c4" ), + array( "chongo /\\../\\\0", "35983f8c" ), + array( "chongo (Landon Curt Noll) /\\../\\", "5036a251" ), + array( "chongo (Landon Curt Noll) /\\../\\\0", "97018583" ), + array( "http://antwrp.gsfc.nasa.gov/apod/astropix.html", "b4448d60" ), + array( "http://en.wikipedia.org/wiki/Fowler_Noll_Vo_hash", "025dfe59" ), + array( "http://epod.usra.edu/", "c5eab3af" ), + array( "http://exoplanet.eu/", "7d21ba1e" ), + array( "http://hvo.wr.usgs.gov/cam3/", "7704cddb" ), + array( "http://hvo.wr.usgs.gov/cams/HMcam/", "d0071bfe" ), + array( "http://hvo.wr.usgs.gov/kilauea/update/deformation.html", "0ff3774c" ), + array( "http://hvo.wr.usgs.gov/kilauea/update/images.html", "b0fea0ea" ), + array( "http://hvo.wr.usgs.gov/kilauea/update/maps.html", "58177303" ), + array( "http://hvo.wr.usgs.gov/volcanowatch/current_issue.html", "4f599cda" ), + array( "http://neo.jpl.nasa.gov/risk/", "3e590a47" ), + array( "http://norvig.com/21-days.html", "965595f8" ), + array( "http://primes.utm.edu/curios/home.php", "c37f178d" ), + array( "http://slashdot.org/", "9711dd26" ), + array( "http://tux.wr.usgs.gov/Maps/155.25-19.5.html", "23c99b7f" ), + array( "http://volcano.wr.usgs.gov/kilaueastatus.php", "6e568b17" ), + array( "http://www.avo.alaska.edu/activity/Redoubt.php", "43f0245b" ), + array( "http://www.dilbert.com/fast/", "bcb7a001" ), + array( "http://www.fourmilab.ch/gravitation/orbits/", "12e6dffe" ), + array( "http://www.fpoa.net/", "0792f2d6" ), + array( "http://www.ioccc.org/index.html", "b966936b" ), + array( "http://www.isthe.com/cgi-bin/number.cgi", "46439ac5" ), + array( "http://www.isthe.com/chongo/bio.html", "728d49af" ), + array( "http://www.isthe.com/chongo/index.html", "d33745c9" ), + array( "http://www.isthe.com/chongo/src/calc/lucas-calc", "bc382a57" ), + array( "http://www.isthe.com/chongo/tech/astro/venus2004.html", "4bda1d31" ), + array( "http://www.isthe.com/chongo/tech/astro/vita.html", "ce35ccae" ), + array( "http://www.isthe.com/chongo/tech/comp/c/expert.html", "3b6eed94" ), + array( "http://www.isthe.com/chongo/tech/comp/calc/index.html", "445c9c58" ), + array( "http://www.isthe.com/chongo/tech/comp/fnv/index.html", "3db8bf9d" ), + array( "http://www.isthe.com/chongo/tech/math/number/howhigh.html", "2dee116d" ), + array( "http://www.isthe.com/chongo/tech/math/number/number.html", "c18738da" ), + array( "http://www.isthe.com/chongo/tech/math/prime/mersenne.html", "5b156176" ), + array( "http://www.isthe.com/chongo/tech/math/prime/mersenne.html#largest", "2aa7d593" ), + array( "http://www.lavarnd.org/cgi-bin/corpspeak.cgi", "b2409658" ), + array( "http://www.lavarnd.org/cgi-bin/haiku.cgi", "e1489528" ), + array( "http://www.lavarnd.org/cgi-bin/rand-none.cgi", "fe1ee07e" ), + array( "http://www.lavarnd.org/cgi-bin/randdist.cgi", "e8842315" ), + array( "http://www.lavarnd.org/index.html", "3a6a63a2" ), + array( "http://www.lavarnd.org/what/nist-test.html", "06d2c18c" ), + array( "http://www.macosxhints.com/", "f8ef7225" ), + array( "http://www.mellis.com/", "843d3300" ), + array( "http://www.nature.nps.gov/air/webcams/parks/havoso2alert/havoalert.cfm", "bb24f7ae" ), + array( "http://www.nature.nps.gov/air/webcams/parks/havoso2alert/timelines_24.cfm", "878c0ec9" ), + array( "http://www.paulnoll.com/", "b557810f" ), + array( "http://www.pepysdiary.com/", "57423246" ), + array( "http://www.sciencenews.org/index/home/activity/view", "87f7505e" ), + array( "http://www.skyandtelescope.com/", "bb809f20" ), + array( "http://www.sput.nl/~rob/sirius.html", "8932abb5" ), + array( "http://www.systemexperts.com/", "0a9b3aa0" ), + array( "http://www.tq-international.com/phpBB3/index.php", "b8682a24" ), + array( "http://www.travelquesttours.com/index.htm", "a7ac1c56" ), + array( "http://www.wunderground.com/global/stations/89606.html", "11409252" ), + array( R10("21701"), "a987f517" ), + array( R10("M21701"), "f309e7ed" ), + array( R10("2^21701-1"), "c9e8f417" ), + array( R10("\x54\xc5"), "7f447bdd" ), + array( R10("\xc5\x54"), "b929adc5" ), + array( R10("23209"), "57022879" ), + array( R10("M23209"), "dcfd2c49" ), + array( R10("2^23209-1"), "6edafff5" ), + array( R10("\x5a\xa9"), "f04fb1f1" ), + array( R10("\xa9\x5a"), "fb7de8b9" ), + array( R10("391581216093"), "c5f1d7e9" ), + array( R10("391581*2^216093-1"), "32c1f439" ), + array( R10("\x05\xf9\x9d\x03\x4c\x81"), "7fd3eb7d" ), + array( R10("FEDCBA9876543210"), "81597da5" ), + array( R10("\xfe\xdc\xba\x98\x76\x54\x32\x10"), "05eb7a25" ), + array( R10("EFCDAB8967452301"), "9c0fa1b5" ), + array( R10("\xef\xcd\xab\x89\x67\x45\x23\x01"), "53ccb1c5" ), + array( R10("0123456789ABCDEF"), "fabece15" ), + array( R10("\x01\x23\x45\x67\x89\xab\xcd\xef"), "4ad745a5" ), + array( R10("1032547698BADCFE"), "e5bdc495" ), + array( R10("\x10\x32\x54\x76\x98\xba\xdc\xfe"), "23b3c0a5" ), + array( R500("\x00"), "fa823dd5" ), + array( R500("\x07"), "0c6c58b9" ), + array( R500("~"), "e2dbccd5" ), + array( R500("\x7f"), "db7f50f9" ), +); + +$i = 0; +$pass = true; +foreach($tests as $test) { + $result = hash('fnv132', $test[0]); + if ($result != $test[1]) { + echo "Iteration " . $i . " failed - expected '" . $test[1] . "', got '" . $result . "' for '" . $test[1] . "'\n"; + $pass = false; + } + $i++; +} + +if($pass) { + echo "PASS"; +} +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-hash/fnv132.php.expectf b/hphp/test/zend/bad/ext-hash/fnv132.php.expectf new file mode 100644 index 000000000..465701e34 --- /dev/null +++ b/hphp/test/zend/bad/ext-hash/fnv132.php.expectf @@ -0,0 +1 @@ +PASS \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-hash/fnv164.php b/hphp/test/zend/bad/ext-hash/fnv164.php new file mode 100644 index 000000000..e02b5c47d --- /dev/null +++ b/hphp/test/zend/bad/ext-hash/fnv164.php @@ -0,0 +1,195 @@ + /\\../\\", "8fd0680da3088a04" ), + array( "chongo /\\../\\\0", "67aad32c078284cc" ), + array( "chongo (Landon Curt Noll) /\\../\\", "b37d55d81c57b331" ), + array( "chongo (Landon Curt Noll) /\\../\\\0", "55ac0f3829057c43" ), + array( "http://antwrp.gsfc.nasa.gov/apod/astropix.html", "cb27f4b8e1b6cc20" ), + array( "http://en.wikipedia.org/wiki/Fowler_Noll_Vo_hash", "26caf88bcbef2d19" ), + array( "http://epod.usra.edu/", "8e6e063b97e61b8f" ), + array( "http://exoplanet.eu/", "b42750f7f3b7c37e" ), + array( "http://hvo.wr.usgs.gov/cam3/", "f3c6ba64cf7ca99b" ), + array( "http://hvo.wr.usgs.gov/cams/HMcam/", "ebfb69b427ea80fe" ), + array( "http://hvo.wr.usgs.gov/kilauea/update/deformation.html", "39b50c3ed970f46c" ), + array( "http://hvo.wr.usgs.gov/kilauea/update/images.html", "5b9b177aa3eb3e8a" ), + array( "http://hvo.wr.usgs.gov/kilauea/update/maps.html", "6510063ecf4ec903" ), + array( "http://hvo.wr.usgs.gov/volcanowatch/current_issue.html", "2b3bbd2c00797c7a" ), + array( "http://neo.jpl.nasa.gov/risk/", "f1d6204ff5cb4aa7" ), + array( "http://norvig.com/21-days.html", "4836e27ccf099f38" ), + array( "http://primes.utm.edu/curios/home.php", "82efbb0dd073b44d" ), + array( "http://slashdot.org/", "4a80c282ffd7d4c6" ), + array( "http://tux.wr.usgs.gov/Maps/155.25-19.5.html", "305d1a9c9ee43bdf" ), + array( "http://volcano.wr.usgs.gov/kilaueastatus.php", "15c366948ffc6997" ), + array( "http://www.avo.alaska.edu/activity/Redoubt.php", "80153ae218916e7b" ), + array( "http://www.dilbert.com/fast/", "fa23e2bdf9e2a9e1" ), + array( "http://www.fourmilab.ch/gravitation/orbits/", "d47e8d8a2333c6de" ), + array( "http://www.fpoa.net/", "7e128095f688b056" ), + array( "http://www.ioccc.org/index.html", "2f5356890efcedab" ), + array( "http://www.isthe.com/cgi-bin/number.cgi", "95c2b383014f55c5" ), + array( "http://www.isthe.com/chongo/bio.html", "4727a5339ce6070f" ), + array( "http://www.isthe.com/chongo/index.html", "b0555ecd575108e9" ), + array( "http://www.isthe.com/chongo/src/calc/lucas-calc", "48d785770bb4af37" ), + array( "http://www.isthe.com/chongo/tech/astro/venus2004.html", "09d4701c12af02b1" ), + array( "http://www.isthe.com/chongo/tech/astro/vita.html", "79f031e78f3cf62e" ), + array( "http://www.isthe.com/chongo/tech/comp/c/expert.html", "52a1ee85db1b5a94" ), + array( "http://www.isthe.com/chongo/tech/comp/calc/index.html", "6bd95b2eb37fa6b8" ), + array( "http://www.isthe.com/chongo/tech/comp/fnv/index.html", "74971b7077aef85d" ), + array( "http://www.isthe.com/chongo/tech/math/number/howhigh.html", "b4e4fae2ffcc1aad" ), + array( "http://www.isthe.com/chongo/tech/math/number/number.html", "2bd48bd898b8f63a" ), + array( "http://www.isthe.com/chongo/tech/math/prime/mersenne.html", "e9966ac1556257f6" ), + array( "http://www.isthe.com/chongo/tech/math/prime/mersenne.html#largest", "92a3d1cd078ba293" ), + array( "http://www.lavarnd.org/cgi-bin/corpspeak.cgi", "f81175a482e20ab8" ), + array( "http://www.lavarnd.org/cgi-bin/haiku.cgi", "5bbb3de722e73048" ), + array( "http://www.lavarnd.org/cgi-bin/rand-none.cgi", "6b4f363492b9f2be" ), + array( "http://www.lavarnd.org/cgi-bin/randdist.cgi", "c2d559df73d59875" ), + array( "http://www.lavarnd.org/index.html", "f75f62284bc7a8c2" ), + array( "http://www.lavarnd.org/what/nist-test.html", "da8dd8e116a9f1cc" ), + array( "http://www.macosxhints.com/", "bdc1e6ab76057885" ), + array( "http://www.mellis.com/", "fec6a4238a1224a0" ), + array( "http://www.nature.nps.gov/air/webcams/parks/havoso2alert/havoalert.cfm", "c03f40f3223e290e" ), + array( "http://www.nature.nps.gov/air/webcams/parks/havoso2alert/timelines_24.cfm", "1ed21673466ffda9" ), + array( "http://www.paulnoll.com/", "df70f906bb0dd2af" ), + array( "http://www.pepysdiary.com/", "f3dcda369f2af666" ), + array( "http://www.sciencenews.org/index/home/activity/view", "9ebb11573cdcebde" ), + array( "http://www.skyandtelescope.com/", "81c72d9077fedca0" ), + array( "http://www.sput.nl/~rob/sirius.html", "0ec074a31be5fb15" ), + array( "http://www.systemexperts.com/", "2a8b3280b6c48f20" ), + array( "http://www.tq-international.com/phpBB3/index.php", "fd31777513309344" ), + array( "http://www.travelquesttours.com/index.htm", "194534a86ad006b6" ), + array( "http://www.wunderground.com/global/stations/89606.html", "3be6fdf46e0cfe12" ), + array( R10("21701"), "017cc137a07eb057" ), + array( R10("M21701"), "9428fc6e7d26b54d" ), + array( R10("2^21701-1"), "9aaa2e3603ef8ad7" ), + array( R10("\x54\xc5"), "82c6d3f3a0ccdf7d" ), + array( R10("\xc5\x54"), "c86eeea00cf09b65" ), + array( R10("23209"), "705f8189dbb58299" ), + array( R10("M23209"), "415a7f554391ca69" ), + array( R10("2^23209-1"), "cfe3d49fa2bdc555" ), + array( R10("\x5a\xa9"), "f0f9c56039b25191" ), + array( R10("\xa9\x5a"), "7075cb6abd1d32d9" ), + array( R10("391581216093"), "43c94e2c8b277509" ), + array( R10("391581*2^216093-1"), "3cbfd4e4ea670359" ), + array( R10("\x05\xf9\x9d\x03\x4c\x81"), "c05887810f4d019d" ), + array( R10("FEDCBA9876543210"), "14468ff93ac22dc5" ), + array( R10("\xfe\xdc\xba\x98\x76\x54\x32\x10"), "ebed699589d99c05" ), + array( R10("EFCDAB8967452301"), "6d99f6df321ca5d5" ), + array( R10("\xef\xcd\xab\x89\x67\x45\x23\x01"), "0cd410d08c36d625" ), + array( R10("0123456789ABCDEF"), "ef1b2a2c86831d35" ), + array( R10("\x01\x23\x45\x67\x89\xab\xcd\xef"), "3b349c4d69ee5f05" ), + array( R10("1032547698BADCFE"), "55248ce88f45f035" ), + array( R10("\x10\x32\x54\x76\x98\xba\xdc\xfe"), "aa69ca6a18a4c885" ), + array( R500("\x00"), "1fe3fce62bd816b5" ), + array( R500("\x07"), "0289a488a8df69d9" ), + array( R500("~"), "15e96e1613df98b5" ), + array( R500("\x7f"), "e6be57375ad89b99" ), +); + +$i = 0; +$pass = true; +foreach($tests as $test) { + $result = hash('fnv164', $test[0]); + if ($result != $test[1]) { + echo "Iteration " . $i . " failed - expected '" . $test[1] . "', got '" . $result . "' for '" . $test[1] . "'\n"; + $pass = false; + } + $i++; +} + +if($pass) { + echo "PASS"; +} +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-hash/fnv164.php.expectf b/hphp/test/zend/bad/ext-hash/fnv164.php.expectf new file mode 100644 index 000000000..465701e34 --- /dev/null +++ b/hphp/test/zend/bad/ext-hash/fnv164.php.expectf @@ -0,0 +1 @@ +PASS \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-hash/hash_algos.php b/hphp/test/zend/bad/ext-hash/hash_algos.php new file mode 100644 index 000000000..1cd67e1df --- /dev/null +++ b/hphp/test/zend/bad/ext-hash/hash_algos.php @@ -0,0 +1,13 @@ + +===Done=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-hash/hash_algos.php.expectf b/hphp/test/zend/bad/ext-hash/hash_algos.php.expectf new file mode 100644 index 000000000..5a0cf479b --- /dev/null +++ b/hphp/test/zend/bad/ext-hash/hash_algos.php.expectf @@ -0,0 +1,90 @@ +*** Testing hash_algos() : basic functionality *** +array(43) { + [%d]=> + string(3) "md2" + [%d]=> + string(3) "md4" + [%d]=> + string(3) "md5" + [%d]=> + string(4) "sha1" + [%d]=> + string(6) "sha224" + [%d]=> + string(6) "sha256" + [%d]=> + string(6) "sha384" + [%d]=> + string(6) "sha512" + [%d]=> + string(9) "ripemd128" + [%d]=> + string(9) "ripemd160" + [%d]=> + string(9) "ripemd256" + [%d]=> + string(9) "ripemd320" + [%d]=> + string(9) "whirlpool" + [%d]=> + string(10) "tiger128,3" + [%d]=> + string(10) "tiger160,3" + [%d]=> + string(10) "tiger192,3" + [%d]=> + string(10) "tiger128,4" + [%d]=> + string(10) "tiger160,4" + [%d]=> + string(10) "tiger192,4" + [%d]=> + string(6) "snefru" + [%d]=> + string(9) "snefru256" + [%d]=> + string(4) "gost" + [%d]=> + string(7) "adler32" + [%d]=> + string(5) "crc32" + [%d]=> + string(6) "crc32b" + [%d]=> + string(6) "fnv132" + [%d]=> + string(6) "fnv164" + [%d]=> + string(5) "joaat" + [%d]=> + string(10) "haval128,3" + [%d]=> + string(10) "haval160,3" + [%d]=> + string(10) "haval192,3" + [%d]=> + string(10) "haval224,3" + [%d]=> + string(10) "haval256,3" + [%d]=> + string(10) "haval128,4" + [%d]=> + string(10) "haval160,4" + [%d]=> + string(10) "haval192,4" + [%d]=> + string(10) "haval224,4" + [%d]=> + string(10) "haval256,4" + [%d]=> + string(10) "haval128,5" + [%d]=> + string(10) "haval160,5" + [%d]=> + string(10) "haval192,5" + [%d]=> + string(10) "haval224,5" + [%d]=> + string(10) "haval256,5" +} +===Done=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-hash/hash_copy_001.php b/hphp/test/zend/bad/ext-hash/hash_copy_001.php new file mode 100644 index 000000000..1f7893943 --- /dev/null +++ b/hphp/test/zend/bad/ext-hash/hash_copy_001.php @@ -0,0 +1,27 @@ + \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-hash/hash_copy_001.php.expectf b/hphp/test/zend/bad/ext-hash/hash_copy_001.php.expectf new file mode 100644 index 000000000..249e0f487 --- /dev/null +++ b/hphp/test/zend/bad/ext-hash/hash_copy_001.php.expectf @@ -0,0 +1,259 @@ +string(3) "md2" +string(32) "d5ac4ffd08f6a57b9bd402b8068392ff" +string(32) "d5ac4ffd08f6a57b9bd402b8068392ff" +string(3) "md4" +string(32) "302c45586b53a984bd3a1237cb81c15f" +string(32) "302c45586b53a984bd3a1237cb81c15f" +string(3) "md5" +string(32) "e35759f6ea35db254e415b5332269435" +string(32) "e35759f6ea35db254e415b5332269435" +string(4) "sha1" +string(40) "29f62a228f726cd728efa7a0ac6a2aba318baf15" +string(40) "29f62a228f726cd728efa7a0ac6a2aba318baf15" +string(6) "sha224" +string(56) "51fd0aa76a00b4a86103895cad5c7c2651ec7da9f4fc1e50c43ede29" +string(56) "51fd0aa76a00b4a86103895cad5c7c2651ec7da9f4fc1e50c43ede29" +string(6) "sha256" +string(64) "d3a13cf52af8e9390caed78b77b6b1e06e102204e3555d111dfd149bc5d54dba" +string(64) "d3a13cf52af8e9390caed78b77b6b1e06e102204e3555d111dfd149bc5d54dba" +string(6) "sha384" +string(96) "6950d861ace4102b803ab8b3779d2f471968233010d2608974ab89804cef6f76162b4433d6e554e11e40a7cdcf510ea3" +string(96) "6950d861ace4102b803ab8b3779d2f471968233010d2608974ab89804cef6f76162b4433d6e554e11e40a7cdcf510ea3" +string(6) "sha512" +string(128) "caced3db8e9e3a5543d5b933bcbe9e7834e6667545c3f5d4087b58ec8d78b4c8a4a5500c9b88f65f7368810ba9905e51f1cff3b25a5dccf76634108fb4e7ce13" +string(128) "caced3db8e9e3a5543d5b933bcbe9e7834e6667545c3f5d4087b58ec8d78b4c8a4a5500c9b88f65f7368810ba9905e51f1cff3b25a5dccf76634108fb4e7ce13" +string(9) "ripemd128" +string(32) "5f1bc5f5aeaf747574dd34a6535cd94a" +string(32) "5f1bc5f5aeaf747574dd34a6535cd94a" +string(9) "ripemd160" +string(40) "02a2a535ee10404c6b5cf9acb178a04fbed67269" +string(40) "02a2a535ee10404c6b5cf9acb178a04fbed67269" +string(9) "ripemd256" +string(64) "547d2ed85ca0a0e3208b5ecf4fc6a7fc1e64db8ff13493e4beaf11e4d71648e2" +string(64) "547d2ed85ca0a0e3208b5ecf4fc6a7fc1e64db8ff13493e4beaf11e4d71648e2" +string(9) "ripemd320" +string(80) "785a7df56858f550966cddfd59ce14b13bf4b18e7892c4c1ad91bf23bf67639bd2c96749ba29cfa6" +string(80) "785a7df56858f550966cddfd59ce14b13bf4b18e7892c4c1ad91bf23bf67639bd2c96749ba29cfa6" +string(9) "whirlpool" +string(128) "6e60597340640e621e25f975cef2b000b0c4c09a7af7d240a52d193002b0a8426fa7da7acc5b37ed9608016d4f396db834a0ea2f2c35f900461c9ac7e5604082" +string(128) "6e60597340640e621e25f975cef2b000b0c4c09a7af7d240a52d193002b0a8426fa7da7acc5b37ed9608016d4f396db834a0ea2f2c35f900461c9ac7e5604082" +string(10) "tiger128,3" +string(32) "8d68e78bc5e62ba925a67aa48595cfc6" +string(32) "8d68e78bc5e62ba925a67aa48595cfc6" +string(10) "tiger160,3" +string(40) "8d68e78bc5e62ba925a67aa48595cfc62cd1e5e0" +string(40) "8d68e78bc5e62ba925a67aa48595cfc62cd1e5e0" +string(10) "tiger192,3" +string(48) "8d68e78bc5e62ba925a67aa48595cfc62cd1e5e08224fc35" +string(48) "8d68e78bc5e62ba925a67aa48595cfc62cd1e5e08224fc35" +string(10) "tiger128,4" +string(32) "a26ca3f58e74fb32ee44b099cb1b5122" +string(32) "a26ca3f58e74fb32ee44b099cb1b5122" +string(10) "tiger160,4" +string(40) "a26ca3f58e74fb32ee44b099cb1b512203375900" +string(40) "a26ca3f58e74fb32ee44b099cb1b512203375900" +string(10) "tiger192,4" +string(48) "a26ca3f58e74fb32ee44b099cb1b512203375900f30b741d" +string(48) "a26ca3f58e74fb32ee44b099cb1b512203375900f30b741d" +string(6) "snefru" +string(64) "fbe88daa74c89b9e29468fa3cd3a657d31845e21bb58dd3f8d806f5179a85c26" +string(64) "fbe88daa74c89b9e29468fa3cd3a657d31845e21bb58dd3f8d806f5179a85c26" +string(9) "snefru256" +string(64) "fbe88daa74c89b9e29468fa3cd3a657d31845e21bb58dd3f8d806f5179a85c26" +string(64) "fbe88daa74c89b9e29468fa3cd3a657d31845e21bb58dd3f8d806f5179a85c26" +string(4) "gost" +string(64) "5820c7c4a0650587538b30ef4099f2b5993069758d5c847a552e6ef7360766a5" +string(64) "5820c7c4a0650587538b30ef4099f2b5993069758d5c847a552e6ef7360766a5" +string(7) "adler32" +string(8) "6f7c0928" +string(8) "6f7c0928" +string(5) "crc32" +string(8) "e5cfc160" +string(8) "e5cfc160" +string(6) "crc32b" +string(8) "69147a4e" +string(8) "69147a4e" +string(6) "fnv132" +string(8) "98139504" +string(8) "98139504" +string(6) "fnv164" +string(16) "14522659f8138684" +string(16) "14522659f8138684" +string(5) "joaat" +string(8) "aaebf370" +string(8) "aaebf370" +string(10) "haval128,3" +string(32) "86362472c8895e68e223ef8b3711d8d9" +string(32) "86362472c8895e68e223ef8b3711d8d9" +string(10) "haval160,3" +string(40) "fabdf6905f3ba18a3c93d6a16b91e31f7222a7a4" +string(40) "fabdf6905f3ba18a3c93d6a16b91e31f7222a7a4" +string(10) "haval192,3" +string(48) "e05d0ff5723028bd5494f32c0c2494cd0b9ccf7540af7b47" +string(48) "e05d0ff5723028bd5494f32c0c2494cd0b9ccf7540af7b47" +string(10) "haval224,3" +string(56) "56b196289d8de8a22296588cf90e5b09cb6fa1b01ce8e92bca40cae2" +string(56) "56b196289d8de8a22296588cf90e5b09cb6fa1b01ce8e92bca40cae2" +string(10) "haval256,3" +string(64) "ff4d7ab0fac2ca437b945461f9b62fd16e71e9103524d5d140445a00e3d49239" +string(64) "ff4d7ab0fac2ca437b945461f9b62fd16e71e9103524d5d140445a00e3d49239" +string(10) "haval128,4" +string(32) "ee44418e0195a0c4a35d112722919a9c" +string(32) "ee44418e0195a0c4a35d112722919a9c" +string(10) "haval160,4" +string(40) "f320cce982d5201a1ccacc1c5ff835a258a97eb1" +string(40) "f320cce982d5201a1ccacc1c5ff835a258a97eb1" +string(10) "haval192,4" +string(48) "a96600107463e8e97a7fe6f260d9bf4f4587a281caafa6db" +string(48) "a96600107463e8e97a7fe6f260d9bf4f4587a281caafa6db" +string(10) "haval224,4" +string(56) "7147c9e1c1e67b942da3229f59a1ab18f121f5d7f5765ca88bc9f200" +string(56) "7147c9e1c1e67b942da3229f59a1ab18f121f5d7f5765ca88bc9f200" +string(10) "haval256,4" +string(64) "82fec42679ed5a77a841962827b88a9cddf7d677736e50bc81f1a14b99f06061" +string(64) "82fec42679ed5a77a841962827b88a9cddf7d677736e50bc81f1a14b99f06061" +string(10) "haval128,5" +string(32) "8d0b157828328ae7d34d60b4b60c1dab" +string(32) "8d0b157828328ae7d34d60b4b60c1dab" +string(10) "haval160,5" +string(40) "54dab5e10dc41503f9b8aa32ffe3bab7cf1da8a3" +string(40) "54dab5e10dc41503f9b8aa32ffe3bab7cf1da8a3" +string(10) "haval192,5" +string(48) "7d91265a1b27698279d8d95a5ee0a20014528070bf6415e7" +string(48) "7d91265a1b27698279d8d95a5ee0a20014528070bf6415e7" +string(10) "haval224,5" +string(56) "7772b2e22f2a3bce917e08cf57ebece46bb33168619a776c6f2f7234" +string(56) "7772b2e22f2a3bce917e08cf57ebece46bb33168619a776c6f2f7234" +string(10) "haval256,5" +string(64) "438a602cb1a761f7bd0a633b7bd8b3ccd0577b524d05174ca1ae1f559b9a2c2a" +string(64) "438a602cb1a761f7bd0a633b7bd8b3ccd0577b524d05174ca1ae1f559b9a2c2a" +string(3) "md2" +string(32) "d5ac4ffd08f6a57b9bd402b8068392ff" +string(32) "5c36f61062d091a8324991132c5e8dbd" +string(3) "md4" +string(32) "302c45586b53a984bd3a1237cb81c15f" +string(32) "1d4196526aada3506efb4c7425651584" +string(3) "md5" +string(32) "e35759f6ea35db254e415b5332269435" +string(32) "f255c114bd6ce94aad092b5141c00d46" +string(4) "sha1" +string(40) "29f62a228f726cd728efa7a0ac6a2aba318baf15" +string(40) "a273396f056554dcd491b5dea1e7baa3b89b802b" +string(6) "sha224" +string(56) "51fd0aa76a00b4a86103895cad5c7c2651ec7da9f4fc1e50c43ede29" +string(56) "1aee028400c56ceb5539625dc2f395abf491409336ca0f3e177a50e2" +string(6) "sha256" +string(64) "d3a13cf52af8e9390caed78b77b6b1e06e102204e3555d111dfd149bc5d54dba" +string(64) "268e7f4cf88504a53fd77136c4c4748169f46ff7150b376569ada9c374836944" +string(6) "sha384" +string(96) "6950d861ace4102b803ab8b3779d2f471968233010d2608974ab89804cef6f76162b4433d6e554e11e40a7cdcf510ea3" +string(96) "0d44981d04bb11b1ef75d5c2932bd0aa2785e7bc454daac954d77e2ca10047879b58997533fc99650b20049c6cb9a6cc" +string(6) "sha512" +string(128) "caced3db8e9e3a5543d5b933bcbe9e7834e6667545c3f5d4087b58ec8d78b4c8a4a5500c9b88f65f7368810ba9905e51f1cff3b25a5dccf76634108fb4e7ce13" +string(128) "28d7c721433782a880f840af0c3f3ea2cad4ef55de2114dda9d504cedeb110e1cf2519c49e4b5da3da4484bb6ba4fd1621ceadc6408f4410b2ebe9d83a4202c2" +string(9) "ripemd128" +string(32) "5f1bc5f5aeaf747574dd34a6535cd94a" +string(32) "f95f5e22b8875ee0c48219ae97f0674b" +string(9) "ripemd160" +string(40) "02a2a535ee10404c6b5cf9acb178a04fbed67269" +string(40) "900d615c1abe714e340f4ecd6a3d65599fd30ff4" +string(9) "ripemd256" +string(64) "547d2ed85ca0a0e3208b5ecf4fc6a7fc1e64db8ff13493e4beaf11e4d71648e2" +string(64) "b9799db40d1af5614118c329169cdcd2c718db6af03bf945ea7f7ba72b8e14f4" +string(9) "ripemd320" +string(80) "785a7df56858f550966cddfd59ce14b13bf4b18e7892c4c1ad91bf23bf67639bd2c96749ba29cfa6" +string(80) "d6d12c1fca7a9c4a59c1be4f40188e92a746a035219e0a6ca1ee53b36a8282527187f7dffaa57ecc" +string(9) "whirlpool" +string(128) "6e60597340640e621e25f975cef2b000b0c4c09a7af7d240a52d193002b0a8426fa7da7acc5b37ed9608016d4f396db834a0ea2f2c35f900461c9ac7e5604082" +string(128) "e8c6a921e7d8eac2fd21d4df6054bb27a02321b2beb5b01b6f88c40706164e64d67ec97519bf76c8af8df896745478b78d42a0159f1a0db16777771fd9d420dc" +string(10) "tiger128,3" +string(32) "8d68e78bc5e62ba925a67aa48595cfc6" +string(32) "a99d2c0348d480dc0f3c35852926e0f1" +string(10) "tiger160,3" +string(40) "8d68e78bc5e62ba925a67aa48595cfc62cd1e5e0" +string(40) "a99d2c0348d480dc0f3c35852926e0f1e1825c16" +string(10) "tiger192,3" +string(48) "8d68e78bc5e62ba925a67aa48595cfc62cd1e5e08224fc35" +string(48) "a99d2c0348d480dc0f3c35852926e0f1e1825c1651957ee3" +string(10) "tiger128,4" +string(32) "a26ca3f58e74fb32ee44b099cb1b5122" +string(32) "66e2c0322421c4e5a9208e6aeed481e5" +string(10) "tiger160,4" +string(40) "a26ca3f58e74fb32ee44b099cb1b512203375900" +string(40) "66e2c0322421c4e5a9208e6aeed481e5c4b00448" +string(10) "tiger192,4" +string(48) "a26ca3f58e74fb32ee44b099cb1b512203375900f30b741d" +string(48) "66e2c0322421c4e5a9208e6aeed481e5c4b00448e344d9d0" +string(6) "snefru" +string(64) "fbe88daa74c89b9e29468fa3cd3a657d31845e21bb58dd3f8d806f5179a85c26" +string(64) "614ca924864fa0e8fa309aa0944e047d5edbfd4964a35858f4d8ec66a0fb88b0" +string(9) "snefru256" +string(64) "fbe88daa74c89b9e29468fa3cd3a657d31845e21bb58dd3f8d806f5179a85c26" +string(64) "614ca924864fa0e8fa309aa0944e047d5edbfd4964a35858f4d8ec66a0fb88b0" +string(4) "gost" +string(64) "5820c7c4a0650587538b30ef4099f2b5993069758d5c847a552e6ef7360766a5" +string(64) "a00961e371287c71c527a41c14564f13b6ed12ac7cd9d5f5dfb3542a25e28d3b" +string(7) "adler32" +string(8) "6f7c0928" +string(8) "d9141747" +string(5) "crc32" +string(8) "e5cfc160" +string(8) "59f8d3d2" +string(6) "crc32b" +string(8) "69147a4e" +string(8) "3ee63999" +string(6) "fnv132" +string(8) "98139504" +string(8) "59ad036f" +string(6) "fnv164" +string(16) "14522659f8138684" +string(16) "5e8c64fba6a5ffcf" +string(5) "joaat" +string(8) "aaebf370" +string(8) "513479b4" +string(10) "haval128,3" +string(32) "86362472c8895e68e223ef8b3711d8d9" +string(32) "ebeeeb05c18af1e53d2d127b561d5e0d" +string(10) "haval160,3" +string(40) "fabdf6905f3ba18a3c93d6a16b91e31f7222a7a4" +string(40) "f1a2c9604fb40899ad502abe0dfcec65115c8a9a" +string(10) "haval192,3" +string(48) "e05d0ff5723028bd5494f32c0c2494cd0b9ccf7540af7b47" +string(48) "d3a7315773a326678208650ed02510ed96cd488d74cd5231" +string(10) "haval224,3" +string(56) "56b196289d8de8a22296588cf90e5b09cb6fa1b01ce8e92bca40cae2" +string(56) "6d7132fabc83c9ab7913748b79ecf10e25409569d3ed144177f46731" +string(10) "haval256,3" +string(64) "ff4d7ab0fac2ca437b945461f9b62fd16e71e9103524d5d140445a00e3d49239" +string(64) "7a469868ad4b92891a3a44524c58a2b8d0f3bebb92b4cf47d19bc6aba973eb95" +string(10) "haval128,4" +string(32) "ee44418e0195a0c4a35d112722919a9c" +string(32) "6ecddb39615f43fd211839287ff38461" +string(10) "haval160,4" +string(40) "f320cce982d5201a1ccacc1c5ff835a258a97eb1" +string(40) "bcd2e7821723ac22e122b8b7cbbd2daaa9a862df" +string(10) "haval192,4" +string(48) "a96600107463e8e97a7fe6f260d9bf4f4587a281caafa6db" +string(48) "ae74619a88dcec1fbecde28e27f009a65ecc12170824d2cd" +string(10) "haval224,4" +string(56) "7147c9e1c1e67b942da3229f59a1ab18f121f5d7f5765ca88bc9f200" +string(56) "fdaba6563f1334d40de24e311f14b324577f97c3b78b9439c408cdca" +string(10) "haval256,4" +string(64) "82fec42679ed5a77a841962827b88a9cddf7d677736e50bc81f1a14b99f06061" +string(64) "289a2ba4820218bdb25a6534fbdf693f9de101362584fdd41e32244c719caa37" +string(10) "haval128,5" +string(32) "8d0b157828328ae7d34d60b4b60c1dab" +string(32) "ffa7993a4e183b245263fb1f63e27343" +string(10) "haval160,5" +string(40) "54dab5e10dc41503f9b8aa32ffe3bab7cf1da8a3" +string(40) "375ee5ab3a9bd07a1dbe5d071e07b2afb3165e3b" +string(10) "haval192,5" +string(48) "7d91265a1b27698279d8d95a5ee0a20014528070bf6415e7" +string(48) "c650585f93c6e041e835caedc621f8c42d8bc6829fb76789" +string(10) "haval224,5" +string(56) "7772b2e22f2a3bce917e08cf57ebece46bb33168619a776c6f2f7234" +string(56) "bc674d465a822817d939f19b38edde083fe5668759836c203c56e3e4" +string(10) "haval256,5" +string(64) "438a602cb1a761f7bd0a633b7bd8b3ccd0577b524d05174ca1ae1f559b9a2c2a" +string(64) "da70ad9bd09ed7c9675329ea2b5279d57761807c7aeac6340d94b5d494809457" +Done \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-hash/hash_copy_002.php b/hphp/test/zend/bad/ext-hash/hash_copy_002.php new file mode 100644 index 000000000..14441fc3a --- /dev/null +++ b/hphp/test/zend/bad/ext-hash/hash_copy_002.php @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-hash/hash_copy_002.php.expectf b/hphp/test/zend/bad/ext-hash/hash_copy_002.php.expectf new file mode 100644 index 000000000..b2dd2567e --- /dev/null +++ b/hphp/test/zend/bad/ext-hash/hash_copy_002.php.expectf @@ -0,0 +1,6 @@ +HipHop Warning: %a +NULL +resource(%d) of type (Hash Context) +HipHop Warning: %a +NULL +Done \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-hash/hash_file_basic1.php b/hphp/test/zend/bad/ext-hash/hash_file_basic1.php new file mode 100644 index 000000000..d87040f2f --- /dev/null +++ b/hphp/test/zend/bad/ext-hash/hash_file_basic1.php @@ -0,0 +1,56 @@ + +===Done=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-hash/hash_file_basic1.php.expectf b/hphp/test/zend/bad/ext-hash/hash_file_basic1.php.expectf new file mode 100644 index 000000000..636f16c7f --- /dev/null +++ b/hphp/test/zend/bad/ext-hash/hash_file_basic1.php.expectf @@ -0,0 +1,23 @@ +*** Testing hash_file() : basic functionality *** +adler32: ff87222e +crc32: 61664d33 +gost: d9e65f0c0c2ef944e4f8a01f4a46365c4f33a2853756878182a7f03e1490a4cd +haval128,3: 8bb81269aca8b7f87829020d76a4e841 +md2: 70f791c0d8fa9edd7d08e32fcba8c354 +md4: a9d034b16bb290c57a645afd6f14cd3b +md5: 704bf818448f5bbb94061332d2c889aa +ripemd128: d02a5f320a11c54c7d51f933b0bd8471 +ripemd160: 3ff296ca6314313af3ed0437c8fc0ebbd3242d3b +ripemd256: 0edd779587c11cf32781111b264251eb37529832fb207121cd45dd95002e48a8 +ripemd320: bf162fa2ff20491b3016c5d8190f8ee47d7dcda8c38eaf6779349a243a029d275eec9adf16ec1b35 +sha1: 8529b266611e3bd0d208fd9614653c2a8f23d0fe +sha256: a0f5702fa5d3670b80033d668e8732b70550392abb53841355447f8bb0f72245 +sha384: a35d875ed96d94b6452acad910f97978200faa2398d8a0e6b9cffa33704c3809e3d2e5b0d63700d8f32a0716e7d2d528 +sha512: 1f42adaf938fbf136e381b164bae5f984c7f9fe60c82728bd889c14f187c7d63e81a0305a1731c7e0a8f3ed9fd2ec92a3833a93502bdf269532601f0b8e2bab0 +snefru: d414b2345d3e7fa1a31c044cf334bfc1fec24d89e464411998d579d24663895f +tiger192,3: 7acf4ebea075fac6fc8ea0e2b4af3cfa71b9460e4c53403a +whirlpool: 4248b149e000477269a4a5f1a84d97cfc3d0199b7aaf505913e6f010a6f83276029d11a9ad545374bc710eb59c7d958985023ab886ffa9ec9a23852844c764ec +adler32(raw): ff87222e +md5(raw): 704bf818448f5bbb94061332d2c889aa +sha256(raw): a0f5702fa5d3670b80033d668e8732b70550392abb53841355447f8bb0f72245 +===Done=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-hash/hash_hmac_basic.php b/hphp/test/zend/bad/ext-hash/hash_hmac_basic.php new file mode 100644 index 000000000..dda7418fc --- /dev/null +++ b/hphp/test/zend/bad/ext-hash/hash_hmac_basic.php @@ -0,0 +1,37 @@ + +===Done=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-hash/hash_hmac_basic.php.expectf b/hphp/test/zend/bad/ext-hash/hash_hmac_basic.php.expectf new file mode 100644 index 000000000..4c3fb4a6f --- /dev/null +++ b/hphp/test/zend/bad/ext-hash/hash_hmac_basic.php.expectf @@ -0,0 +1,23 @@ +*** Testing hash_hmac() : basic functionality *** +adler32: 12c803f7 +crc32: 96859101 +gost: a4a3c80bdf3f8665bf07376a34dc9c1b11af7c813f4928f62e39f0c0dc564dad +haval128,3: 82cd0f4bd36729b5c80c33efa8c13ac5 +md2: 6d111dab563025e4cb5f4425c991fa12 +md4: 10cdbfe843000c623f8b8da0d5d20b0b +md5: 2a632783e2812cf23de100d7d6a463ae +ripemd128: 26c2f694a65b1928b668cf55f65529b4 +ripemd160: 4b3433ba596ec39692bb7ce760a9ee5fb818113f +ripemd256: 4e4e5ec19322895a727f272dfe68f87bc1af66cc6ce27c6c1360a5ee78a14b30 +ripemd320: f10a8ff82e828b92a5ff0a02fc9032bc61352d0d824821fc42f7e09cf5b5f41ee59fd33a730d7469 +sha1: 5bfdb62b97e2c987405463e9f7c193139c0e1fd0 +sha256: 49bde3496b9510a17d0edd8a4b0ac70148e32a1d51e881ec76faa96534125838 +sha384: b781415b856744834e532b9899e1aa0bec5a82cf09a838f0a833470468e2a42648a52428cfd9012385d04de5cd9bd122 +sha512: 7de05636b18e2b0ca3427e03f53074af3a48a7b9df226daba4f22324c570638e7d7b26430e214799c9ce0db5ee88dad3292ca0f38bf99b8eaebed59b3a9c140a +snefru: 67af483046f9cf16fe19f9087929ccfc6ad176ade3290b4d33f43e0ddb07e711 +tiger192,3: 00a0f884f15a9e5549ed0e40ca0190522d369027e16d5b59 +whirlpool: 4a0f1582b21b7aff59bfba7f9c29131c69741b2ce80acdc7d314040f3b768cf5a17e30b74cceb86fbc6b34b1692e0addd5bfd7cfc043d40c0621f1b97e26fa49 +adler32(raw): 12c803f7 +md5(raw): 2a632783e2812cf23de100d7d6a463ae +sha256(raw): 49bde3496b9510a17d0edd8a4b0ac70148e32a1d51e881ec76faa96534125838 +===Done=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-hash/hash_hmac_file_basic.php b/hphp/test/zend/bad/ext-hash/hash_hmac_file_basic.php new file mode 100644 index 000000000..fecd7bada --- /dev/null +++ b/hphp/test/zend/bad/ext-hash/hash_hmac_file_basic.php @@ -0,0 +1,65 @@ + +===Done=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-hash/hash_hmac_file_basic.php.expectf b/hphp/test/zend/bad/ext-hash/hash_hmac_file_basic.php.expectf new file mode 100644 index 000000000..55efc39cd --- /dev/null +++ b/hphp/test/zend/bad/ext-hash/hash_hmac_file_basic.php.expectf @@ -0,0 +1,27 @@ +*** Testing hash_hmac_file() : basic functionality *** +adler32: 0f8c02f9 +crc32: f2a60b9c +gost: 94c39a40d5db852a8dc3d24e37eebf2d53e3d711457c59cd02b614f792a9d918 +haval128,3: e8fcff647f1a675acb429130fb94a17e +md2: a685475e600314bb549ab4f33c3b27cb +md4: cbc6bff781f48f57378d3effa27553e4 +md5: 8bddf39dd1c566c27acc7fa85ec36acf +ripemd128: 03269b76bf61d508c50f038cbe9ba691 +ripemd160: 94652211292268d97eb63344a3a05d3009f9d2d3 +ripemd256: b6ab414cc1630e1e474fefa41976d252f38ca7cf401552774e71736165e512e7 +ripemd320: 71271a649265740eed4b9931417f979fd81eba6288f4e08ff2997bc3dd6858da054d53a9f1fffe8c +sha1: 7f338d17b72371091abd28f451bc8d1f3a9eb3b6 +sha256: 9135286ca4c84dec711e4b831f6cd39e672e5ff93d011321274eb76733cc1e40 +sha384: 364fdc45a4c742763366ab5d3d1c17c24057e6c3b641607a36d969f00c88da25b19c8b88c8632411e3a0a02397f88aca +sha512: d460aabdf0353655059ed0d408efa91f19c4cda46acc2a4e0adf4764b06951c899fbb2ed41519db78b58ff7be17b1b2910aebe674a56861b232143571b35c83f +snefru: 7b79787e1c1d926b6cc98327f05c5d04ba6227ab51c1398661861196016ef34c +tiger192,3: ca89badf843ba68e3fae5832635aa848a72a4bc11676edd4 +whirlpool: 37a0fbb90547690d5e5e11c046f6654ffdb7bab15e16d9d79c7d85765cc4bdcbfd9df8db7a3ce9558f3f244fead00ca29cf05297f75596555195a0683f15d69f +adler32(raw): 0f8c02f9 +md5(raw): 8bddf39dd1c566c27acc7fa85ec36acf +sha256(raw): 9135286ca4c84dec711e4b831f6cd39e672e5ff93d011321274eb76733cc1e40 +Error cases: +HipHop Warning: %a +HipHop Warning: %a +HipHop Warning: %a +===Done=== \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-hash/joaat.php b/hphp/test/zend/bad/ext-hash/joaat.php new file mode 100644 index 000000000..92c5ebf86 --- /dev/null +++ b/hphp/test/zend/bad/ext-hash/joaat.php @@ -0,0 +1,27 @@ + \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-hash/joaat.php.expectf b/hphp/test/zend/bad/ext-hash/joaat.php.expectf new file mode 100644 index 000000000..465701e34 --- /dev/null +++ b/hphp/test/zend/bad/ext-hash/joaat.php.expectf @@ -0,0 +1 @@ +PASS \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-hash/mhash_001.php b/hphp/test/zend/bad/ext-hash/mhash_001.php new file mode 100644 index 000000000..d43a88908 --- /dev/null +++ b/hphp/test/zend/bad/ext-hash/mhash_001.php @@ -0,0 +1,31 @@ + "2d9bdb91f94e96d9c4e2ae532acc936a", +"MHASH_SHA1" => "2f9341e55a9083edf5497bf83ba3db812a7de0a3", +"MHASH_HAVAL256" => "b255feff01ad641b27358dc7909bc695a1fca53bddfdfaf19020b275928793af", +"MHASH_HAVAL192" => "4ce837de481e1e30092ab2c610057094c988dfd7db1e01cd", +"MHASH_HAVAL224" => "5362d1856752bf2c139bb2d6fdd772b9c515c8ce5ec82695264b85e1", +"MHASH_HAVAL160" => "c6b36f87750b18576981bc17b4f22271947bf9cb", +"MHASH_RIPEMD160" => "6c47435aa1d359c4b7c6af46349f0c3e1258583d", +"MHASH_GOST" => "101b0a2552cebdf5137cadf15147f21e55b6432935bb9c2c03c7e28d188b2d9e", +"MHASH_TIGER" => "953ac3799a01b9fdeb91aeab97207e67395cbb54300be00d", +"MHASH_CRC32" => "83041db8", +"MHASH_CRC32B" => "df5ab7a4" +); + +$data = "This is the test of the mhash extension..."; + +foreach ($supported_hash_al as $hash=>$wanted) { + $result = mhash(constant($hash), $data); + if (bin2hex($result)==$wanted) { + echo "$hash\nok\n"; + } else { + echo "$hash: "; + var_dump($wanted); + echo "$hash: "; + var_dump(bin2hex($result)); + } + echo "\n"; +} +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-hash/mhash_001.php.expectf b/hphp/test/zend/bad/ext-hash/mhash_001.php.expectf new file mode 100644 index 000000000..f6e37d771 --- /dev/null +++ b/hphp/test/zend/bad/ext-hash/mhash_001.php.expectf @@ -0,0 +1,32 @@ +MHASH_MD5 +ok + +MHASH_SHA1 +ok + +MHASH_HAVAL256 +ok + +MHASH_HAVAL192 +ok + +MHASH_HAVAL224 +ok + +MHASH_HAVAL160 +ok + +MHASH_RIPEMD160 +ok + +MHASH_GOST +ok + +MHASH_TIGER +ok + +MHASH_CRC32 +ok + +MHASH_CRC32B +ok \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-hash/mhash_002.php b/hphp/test/zend/bad/ext-hash/mhash_002.php new file mode 100644 index 000000000..0302e35de --- /dev/null +++ b/hphp/test/zend/bad/ext-hash/mhash_002.php @@ -0,0 +1,38 @@ + 16, +"MD4" => 16, +"SHA1" => 20, +"SHA256" => 32, +"HAVAL256" => 32, +"HAVAL192" => 24, +"HAVAL224" => 28, +"HAVAL160" => 20, +"HAVAL128" => 16, +"RIPEMD160" => 20, +"GOST" => 32, +"TIGER" => 24, +"TIGER160" => 20, +"TIGER128" => 16, +"CRC32" => 4, +"CRC32B" => 4, +"ADLER32" => 4, +"NA_XYZ" => 0 /* verify that the algorythm works */ +); + +$hc = mhash_count() + 1; + +$known_hash_al = array(); +for ($i=0; $i < $hc; $i++) { + $known_hash_al[mhash_get_hash_name($i)] = $i; +} + +foreach ($supported_hash_al as $name => $len) { + if (array_key_exists($name, $known_hash_al)) { + $len = mhash_get_block_size($known_hash_al[$name]); + echo "$name = $len\n"; + } else { + echo "$name ? $len\n"; + } +} +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-hash/mhash_002.php.expectregex b/hphp/test/zend/bad/ext-hash/mhash_002.php.expectregex new file mode 100644 index 000000000..4b0d2154a --- /dev/null +++ b/hphp/test/zend/bad/ext-hash/mhash_002.php.expectregex @@ -0,0 +1,18 @@ +MD5 . 16 +MD4 . 16 +SHA1 . 20 +SHA256 . 32 +HAVAL256 . 32 +HAVAL192 . 24 +HAVAL224 . 28 +HAVAL160 . 20 +HAVAL128 . 16 +RIPEMD160 . 20 +GOST . 32 +TIGER . 24 +TIGER160 . 20 +TIGER128 . 16 +CRC32 . 4 +CRC32B . 4 +ADLER32 . 4 +NA_XYZ . 0 \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-hash/mhash_003.php b/hphp/test/zend/bad/ext-hash/mhash_003.php new file mode 100644 index 000000000..6f09350f7 --- /dev/null +++ b/hphp/test/zend/bad/ext-hash/mhash_003.php @@ -0,0 +1,31 @@ + "8690154eaf9432cde9347aa15094b9c046eb06e6a0940c5479aa7a6367ae68b5e0e0745e5709fede2d9fe9739d9aad413759faa73acced821077b4ddb2788064e371eb53b3a9d55ed2839aab2655c82cfedbe83a208461c799d9d77ae481061c81539b01", +"MHASH_SHA1" => "dd315c70061d07455d53c2fb0b08df0c61aa665c1ab1a701fa10955423248ba832a5ade406b39b78630aba3d1688e622494a0eae279d4ece9ad4bdf76e878fcb084a33c9153c2b48131d30a75b00a7c05b91f1ffeabf59bb1271c4d8a11990b84baf6d49", +"MHASH_HAVAL256" => "0ede47009f87d5e9a24ecf5077d60c483657a5d98404ab2bb780f5872c90caf61c0d67645a848e55fee107296f4169c95b4e61f0aeeefab2648554c1171fb0a2fc32aa5aeed3d5c155d334367d4959622cdadefe43ae17bd1a75f9d4fef77bf192be5b78", +"MHASH_HAVAL224" => "5c4aff3d825ad608f608c8eae779ee3868610bc60a98f3d770b311a6677c797fc2dadcab71dde0c0191e068397ab297f0de5cbbc6cbcd0c78ca8470c42401f6b77e81dc2ba8d51930ff982760335324fb850ac2d30b73514004c096d60472d320e0ec349", +"MHASH_HAVAL192" => "22e0c27126023c852ef94107bb2f1ee132b064178b9dcbfb1c32e658760b8f70bdc5b1c52599031628c2433bee2b0870ab7a38aeb21215134ec1088975b9a96487642971ef9eb3d987baf9765fd9e6d64d494e1719aa84afe7e0a0784c74979ebab1c787", +"MHASH_HAVAL160" => "d6e5f0ef07f3facced646eedb6364758ecde6dc6fb061e00a496f5ceb723f78ea135884d9682226ded69c11d8431240ef97cad583c4f29593bbf3dd3cab0b8792eb3d86022ca6002ebd0d9b4429909d4af85bed2b5a96b3e47b9b8cac919c1177ec40d7e", +"MHASH_RIPEMD160" => "e4d5db469af29f78e2b90dc735c9cf020a1d5b19a6674458677794d4dca144d426c562aff98d8e866a8a924299ebf6b0ea9a1637f987a1fb5de9b647edc35b1447605e1babc3084be7a003931117eb33432d4142e225df044b033f3ff64bb4a18682a4f9", +"MHASH_GOST" => "c044f669bd7e8643953d77c682fd179242d9df157dadf873be4d9601e4647c018234689359e7220ab0492a6240d184c478634073dea87f79be7f86fd4e2564f7d709b68a46440a121250e00fc7d57d45a9c07ee23a704ff4148c0dad7077ec527b194d87", +"MHASH_TIGER" => "470aca9d7bc9ea67e46402332f26f6b15532fe6037231cce297912d32f5142f6276b2358e7f1ccba8b116ec0c0c2a46845f7a5042f0ee41906c0db9ba9b80f82181720314d2a70981bba79da4bc9c4564d95f8d709d5604fd48d369797a218a862196f48", +"MHASH_CRC32" => "481c40148c26185f9a59ef18e86f51c5d2d0315b46711d22ae08c1ccdd669fe956c817380815e3a545f6ee453c9da48d1d994dbc3ac8ba85a572108412f06b2a16b1489cda75b118e82f7d9bdfdb68336957bbf19e4a3f76750d6985a53dd557229dfcf3", +"MHASH_CRC32B" => "65ab6cb5fb7d3ea67f5da92a9bd746b6628a13368fcbcd43af49092e9c6a960fd030a5ce3c1f0ddb512ec698be96e77969748db66278b0fd837d24d8c898f50bd70993b48cc8accf4b44c54431e91385ddf04c7560a1a7368fc9e6f763457c90b07f04f1" +); + +foreach ($supported_hash_al as $hash=>$wanted) { + $passwd = str_repeat($hash, 10); + $salt = str_repeat($hash, 2); + $result = mhash_keygen_s2k(constant($hash), $passwd, $salt, 100); + if (!strcmp(bin2hex($result), $wanted)) { + echo "$hash\nok\n"; + } else { + echo "$hash: "; + var_dump($wanted); + echo "$hash: "; + var_dump(bin2hex($result)); + } + echo "\n"; +} +?> \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-hash/mhash_003.php.expectf b/hphp/test/zend/bad/ext-hash/mhash_003.php.expectf new file mode 100644 index 000000000..f378c067a --- /dev/null +++ b/hphp/test/zend/bad/ext-hash/mhash_003.php.expectf @@ -0,0 +1,32 @@ +MHASH_MD5 +ok + +MHASH_SHA1 +ok + +MHASH_HAVAL256 +ok + +MHASH_HAVAL224 +ok + +MHASH_HAVAL192 +ok + +MHASH_HAVAL160 +ok + +MHASH_RIPEMD160 +ok + +MHASH_GOST +ok + +MHASH_TIGER +ok + +MHASH_CRC32 +ok + +MHASH_CRC32B +ok \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-hash/mhash_004.php b/hphp/test/zend/bad/ext-hash/mhash_004.php new file mode 100644 index 000000000..502af26a1 --- /dev/null +++ b/hphp/test/zend/bad/ext-hash/mhash_004.php @@ -0,0 +1,8 @@ + \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-hash/mhash_004.php.expectf b/hphp/test/zend/bad/ext-hash/mhash_004.php.expectf new file mode 100644 index 000000000..0ab681cd7 --- /dev/null +++ b/hphp/test/zend/bad/ext-hash/mhash_004.php.expectf @@ -0,0 +1,3 @@ +int(1) +string(32) "098f6bcd4621d373cade4e832627b4f6" +int(1) \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-hash/sha224.php b/hphp/test/zend/bad/ext-hash/sha224.php new file mode 100644 index 000000000..f75f2a8a0 --- /dev/null +++ b/hphp/test/zend/bad/ext-hash/sha224.php @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/hphp/test/zend/bad/ext-hash/tiger.php.expectf b/hphp/test/zend/bad/ext-hash/tiger.php.expectf new file mode 100644 index 000000000..e394f6f65 --- /dev/null +++ b/hphp/test/zend/bad/ext-hash/tiger.php.expectf @@ -0,0 +1,5 @@ +3293ac630c13f0245f92bbb1766e16167a4e58492dde73f3 +2aab1484e8c158f2bfb8c5ff41b57a525129131c957b5f93 +9366604ea109e48ed763caabb2d5633b4946eb295ef5781a +b19abf166d158625808f035edf8be4e6b0bcb31d070ec353 +badd965340a9e83e4a16f48a5038c01b856a9158ef59fec1 \ No newline at end of file diff --git a/hphp/test/zend/good/ext-hash/gost.php b/hphp/test/zend/good/ext-hash/gost.php new file mode 100644 index 000000000..c204de1f8 --- /dev/null +++ b/hphp/test/zend/good/ext-hash/gost.php @@ -0,0 +1,8 @@ + \ No newline at end of file diff --git a/hphp/test/zend/good/ext-hash/gost.php.expectf b/hphp/test/zend/good/ext-hash/gost.php.expectf new file mode 100644 index 000000000..02fd733bc --- /dev/null +++ b/hphp/test/zend/good/ext-hash/gost.php.expectf @@ -0,0 +1,6 @@ +ce85b99cc46752fffee35cab9a7b0278abb4c2d2055cff685af4912c49490f8d +77b7fa410c9ac58a25f49bca7d0468c9296529315eaca76bd1a10f376d1f4294 +a3ebc4daaab78b0be131dab5737a7f67e602670d543521319150d2e14eeec445 +03840d6348763f11e28e7b1ecc4da0cdf7f898fa555b928ef684c6c5b8f46d9f +fd1b746d9397e78edd311baef391450434271e02816caa37680d6d7381c79d4e +715e59cdc8ebde9fdf0fe2a2e811b3bf7f48209a01505e467d2cd2aa2bbb5ecf \ No newline at end of file diff --git a/hphp/test/zend/good/ext-hash/hash_error.php b/hphp/test/zend/good/ext-hash/hash_error.php new file mode 100644 index 000000000..b628b9154 --- /dev/null +++ b/hphp/test/zend/good/ext-hash/hash_error.php @@ -0,0 +1,22 @@ + +===Done=== \ No newline at end of file diff --git a/hphp/test/zend/good/ext-hash/hash_error.php.expectf b/hphp/test/zend/good/ext-hash/hash_error.php.expectf new file mode 100644 index 000000000..64039e638 --- /dev/null +++ b/hphp/test/zend/good/ext-hash/hash_error.php.expectf @@ -0,0 +1,16 @@ +*** Testing hash() : error conditions *** + +-- Testing hash() function with less than expected no. of arguments -- +HipHop Warning: %a +NULL +HipHop Warning: %a +NULL + +-- Testing hash() function with more than expected no. of arguments -- +HipHop Warning: %a +NULL + +-- Testing hash() function with invalid hash algorithm -- +HipHop Warning: %a +bool(false) +===Done=== \ No newline at end of file diff --git a/hphp/test/zend/good/ext-hash/hash_file_basic.php b/hphp/test/zend/good/ext-hash/hash_file_basic.php new file mode 100644 index 000000000..119359981 --- /dev/null +++ b/hphp/test/zend/good/ext-hash/hash_file_basic.php @@ -0,0 +1,27 @@ + +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/good/ext-hash/hash_file_basic.php.expectf b/hphp/test/zend/good/ext-hash/hash_file_basic.php.expectf new file mode 100644 index 000000000..eef9f06d4 --- /dev/null +++ b/hphp/test/zend/good/ext-hash/hash_file_basic.php.expectf @@ -0,0 +1,7 @@ +*** Testing hash_file() : basic functionality *** +string(32) "5c6ffbdd40d9556b73a21e63c3e0e904" +string(40) "c0854fb9fb03c41cce3802cb0d220529e6eef94e" +string(64) "68b1282b91de2c054c36629cb8dd447f12f096d3e3c587978dc2248444633483" +string(128) "0a8c150176c2ba391d7f1670ef4955cd99d3c3ec8cf06198cec30d436f2ac0c9b64229b5a54bdbd5563160503ce992a74be528761da9d0c48b7c74627302eb25" +string(24) "XG/73UDZVWtzoh5jw+DpBA==" +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/good/ext-hash/hash_file_error.php b/hphp/test/zend/good/ext-hash/hash_file_error.php new file mode 100644 index 000000000..690122bf9 --- /dev/null +++ b/hphp/test/zend/good/ext-hash/hash_file_error.php @@ -0,0 +1,35 @@ + +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/good/ext-hash/hash_file_error.php.expectf b/hphp/test/zend/good/ext-hash/hash_file_error.php.expectf new file mode 100644 index 000000000..28ba73368 --- /dev/null +++ b/hphp/test/zend/good/ext-hash/hash_file_error.php.expectf @@ -0,0 +1,18 @@ +*** Testing hash_file() : error conditions *** + +-- Testing hash_file() function with an unknown algorithm -- +HipHop Warning: %a +bool(false) + +-- Testing hash_file() function with a non-existant file -- +HipHop Warning: %a +bool(false) + +-- Testing hash_file() function with less than expected no. of arguments -- +HipHop Warning: %a +NULL + +-- Testing hash_file() function with more than expected no. of arguments -- +HipHop Warning: %a +NULL +===DONE=== \ No newline at end of file diff --git a/hphp/test/zend/good/ext-hash/hash_hmac_error.php b/hphp/test/zend/good/ext-hash/hash_hmac_error.php new file mode 100644 index 000000000..44524108b --- /dev/null +++ b/hphp/test/zend/good/ext-hash/hash_hmac_error.php @@ -0,0 +1,25 @@ + +===Done=== \ No newline at end of file diff --git a/hphp/test/zend/good/ext-hash/hash_hmac_error.php.expectf b/hphp/test/zend/good/ext-hash/hash_hmac_error.php.expectf new file mode 100644 index 000000000..6c1d5323e --- /dev/null +++ b/hphp/test/zend/good/ext-hash/hash_hmac_error.php.expectf @@ -0,0 +1,18 @@ +*** Testing hash_hmac() : error conditions *** + +-- Testing hash_hmac() function with less than expected no. of arguments -- +HipHop Warning: %a +NULL +HipHop Warning: %a +NULL +HipHop Warning: %a +NULL + +-- Testing hash_hmac() function with more than expected no. of arguments -- +HipHop Warning: %a +NULL + +-- Testing hash_hmac() function with invalid hash algorithm -- +HipHop Warning: %a +bool(false) +===Done=== \ No newline at end of file diff --git a/hphp/test/zend/good/ext-hash/hash_hmac_file_error.php b/hphp/test/zend/good/ext-hash/hash_hmac_file_error.php new file mode 100644 index 000000000..8015aae42 --- /dev/null +++ b/hphp/test/zend/good/ext-hash/hash_hmac_file_error.php @@ -0,0 +1,27 @@ + +===Done=== \ No newline at end of file diff --git a/hphp/test/zend/good/ext-hash/hash_hmac_file_error.php.expectf b/hphp/test/zend/good/ext-hash/hash_hmac_file_error.php.expectf new file mode 100644 index 000000000..791f75634 --- /dev/null +++ b/hphp/test/zend/good/ext-hash/hash_hmac_file_error.php.expectf @@ -0,0 +1,16 @@ +*** Testing hash() : error conditions *** + +-- Testing hash_hmac_file() function with less than expected no. of arguments -- +HipHop Warning: %a +NULL +HipHop Warning: %a +NULL +HipHop Warning: %a +NULL + +-- Testing hash_hmac_file() function with more than expected no. of arguments -- +HipHop Warning: %a + +-- Testing hash_hmac_file() function with invalid hash algorithm -- +HipHop Warning: %a +===Done=== \ No newline at end of file diff --git a/hphp/test/zend/good/ext-hash/haval.php b/hphp/test/zend/good/ext-hash/haval.php new file mode 100644 index 000000000..b2573f9e3 --- /dev/null +++ b/hphp/test/zend/good/ext-hash/haval.php @@ -0,0 +1,21 @@ + \ No newline at end of file diff --git a/hphp/test/zend/good/ext-hash/snefru.php.expectf b/hphp/test/zend/good/ext-hash/snefru.php.expectf new file mode 100644 index 000000000..72e1fd6b5 --- /dev/null +++ b/hphp/test/zend/good/ext-hash/snefru.php.expectf @@ -0,0 +1,5 @@ +8617f366566a011837f4fb4ba5bedea2b892f3ed8b894023d16ae344b2be5881 +674caa75f9d8fd2089856b95e93a4fb42fa6c8702f8980e11d97a142d76cb358 +94682bc46e5fbb8417e2f3e10ed360484048d946bb8cbb0ea4cad2700dbeaab0 +c54c602ac46383716ee7200a76c9c90a7b435bbe31d13f04e0b00a7ea5c347fa +7a8539c59e192e8d70b1ab82aa86a1b54560d42020bda4e00ddd6d048fe3bcaa \ No newline at end of file diff --git a/hphp/test/zend/good/ext-hash/whirlpool.php b/hphp/test/zend/good/ext-hash/whirlpool.php new file mode 100644 index 000000000..7d45517bc --- /dev/null +++ b/hphp/test/zend/good/ext-hash/whirlpool.php @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/hphp/test/zend/good/ext-hash/whirlpool.php.expectf b/hphp/test/zend/good/ext-hash/whirlpool.php.expectf new file mode 100644 index 000000000..c1163cdd8 --- /dev/null +++ b/hphp/test/zend/good/ext-hash/whirlpool.php.expectf @@ -0,0 +1,3 @@ +19fa61d75522a4669b44e39c1d2e1726c530232130d407f89afee0964997f7a73e83be698b288febcf88e3e03c4f0757ea8964e59b63d93708b138cc42a66eb3 +916ce6431d2f384be68d96bcaba800c21b82e9cc2f07076554c9557f85476b5d8f2b263951121fa955e34b31a4cdc857bdf076b123c2252543dcef34f84a7ef3 +b51984710d11893ac08e10529519f9801d82ea534629d14bc8c810307934496017ccdf23bfcb62c7e1259664e84c9388ff646b0b46688b0a6c32e5571234dd95 \ No newline at end of file diff --git a/hphp/tools/import_zend_test.py b/hphp/tools/import_zend_test.py index 871d8833a..e26933eb7 100755 --- a/hphp/tools/import_zend_test.py +++ b/hphp/tools/import_zend_test.py @@ -103,7 +103,6 @@ no_import = ( # not imported yet, but will be '/ext/exif', '/ext/gd', - '/ext/hash', '/ext/iconv', '/ext/imap', '/ext/intl',