diff options
author | Sara Golemon <pollita@php.net> | 2005-11-18 19:51:09 +0000 |
---|---|---|
committer | Sara Golemon <pollita@php.net> | 2005-11-18 19:51:09 +0000 |
commit | 5c213de12e21a61e84a63400f18d3985ff696495 (patch) | |
tree | c25856a426e731853bb6fb1a1eac2f06dae17630 /ext/hash/tests/sha384.phpt | |
parent | 14889ccfbd09ed9575c48630ee4cf55dedfa9054 (diff) | |
download | php-git-5c213de12e21a61e84a63400f18d3985ff696495.tar.gz |
Initial Commit
Diffstat (limited to 'ext/hash/tests/sha384.phpt')
-rw-r--r-- | ext/hash/tests/sha384.phpt | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/ext/hash/tests/sha384.phpt b/ext/hash/tests/sha384.phpt new file mode 100644 index 0000000000..60e5f5c42d --- /dev/null +++ b/ext/hash/tests/sha384.phpt @@ -0,0 +1,21 @@ +--TEST-- +sha512 algorithm +--SKIPIF-- +<?php if(!extension_loaded("hash")) print "skip"; ?> +--FILE-- +<?php +echo hash('sha384', '') . "\n"; +echo hash('sha384', 'a') . "\n"; +echo hash('sha384', '012345678901234567890123456789012345678901234567890123456789') . "\n"; + +/* FIPS-180 Vectors */ +echo hash('sha384', 'abc') . "\n"; +echo hash('sha384', 'abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu') . "\n"; +echo hash('sha384', str_repeat('a', 1000000)) . "\n"; +--EXPECTF-- +38b060a751ac96384cd9327eb1b1e36a21fdb71114be07434c0cc7bf63f6e1da274edebfe76f65fbd51ad2f14898b95b +54a59b9f22b0b80880d8427e548b7c23abd873486e1f035dce9cd697e85175033caa88e6d57bc35efae0b5afd3145f31 +ce6bebce38aad0fd35805b50f77f3e1814d46df8e930356ec905a5d7b94bfa615fce4c3b6caf50eb4a7f1a1164887470 +cb00753f45a35e8bb5a03d699ac65007272c32ab0eded1631a8b605a43ff5bed8086072ba1e7cc2358baeca134c825a7 +09330c33f71147e83d192fc782cd1b4753111b173b3b05d22fa08086e3b0f712fcc7c71a557e2db966c3e9fa91746039 +9d0e1809716474cb086e834e310a4a1ced149e9c00f248527972cec5704c2a5b07b8b3dc38ecc4ebae97ddd87f3d8985 |