Annotation of embedaddon/php/ext/hash/tests/sha1.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: sha1 algorithm
3: --SKIPIF--
4: <?php if(!extension_loaded("hash")) print "skip"; ?>
5: --FILE--
6: <?php
7: echo hash('sha1', '') . "\n";
8: echo hash('sha1', 'a') . "\n";
9: echo hash('sha1', '012345678901234567890123456789012345678901234567890123456789') . "\n";
10:
11: /* FIPS-180 Vectors */
12: echo hash('sha1', 'abc') . "\n";
13: echo hash('sha1', 'abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq') . "\n";
14: echo hash('sha1', str_repeat('a', 1000000)) . "\n";
15: --EXPECT--
16: da39a3ee5e6b4b0d3255bfef95601890afd80709
17: 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8
18: f52e3c2732de7bea28f216d877d78dae1aa1ac6a
19: a9993e364706816aba3e25717850c26c9cd0d89d
20: 84983e441c3bd26ebaae4aa1f95129e5e54670f1
21: 34aa973cd4c4daa4f61eeb2bdbad27316534016f
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>