xref: /PHP-5.4/ext/hash/tests/crc32.phpt (revision 523cccc0)
1--TEST--
2CRC32
3--SKIPIF--
4<?php extension_loaded('hash') or die('skip'); ?>
5--FILE--
6<?php
7echo hash('crc32', ''), "\n";
8echo hash('crc32', 'a'), "\n";
9echo hash('crc32', 'abc'), "\n";
10echo hash('crc32', 'message digest'), "\n";
11echo hash('crc32', 'abcdefghijklmnopqrstuvwxyz'), "\n";
12echo hash('crc32', 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'), "\n";
13echo hash('crc32', '12345678901234567890123456789012345678901234567890123456789012345678901234567890'), "\n";
14echo hash('crc32b', ''), "\n";
15echo hash('crc32b', 'a'), "\n";
16echo hash('crc32b', 'abc'), "\n";
17echo hash('crc32b', 'message digest'), "\n";
18echo hash('crc32b', 'abcdefghijklmnopqrstuvwxyz'), "\n";
19echo hash('crc32b', 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'), "\n";
20echo hash('crc32b', '12345678901234567890123456789012345678901234567890123456789012345678901234567890'), "\n";
21?>
22--EXPECT--
2300000000
246b9b9319
2573bb8c64
265703c9bf
279693bf77
28882174a0
2996790816
3000000000
31e8b7be43
32352441c2
3320159d7f
344c2750bd
351fc2e6d2
367ca94a72
37