diff options
author | Sara Golemon <pollita@php.net> | 2006-11-15 20:06:09 +0000 |
---|---|---|
committer | Sara Golemon <pollita@php.net> | 2006-11-15 20:06:09 +0000 |
commit | 2eb308ff756ef04e6671357e6908c53bfe342eb6 (patch) | |
tree | 3e6a97252602a60c896cb4bab8d17373c7814327 /ext/hash/tests/md2.phpt | |
parent | 892c00bb9f8ab68a870de5ec7f252d88048c69a4 (diff) | |
download | php-git-2eb308ff756ef04e6671357e6908c53bfe342eb6.tar.gz |
Backport md2, ripemd256, and ripemd320 algos from HEAD
Diffstat (limited to 'ext/hash/tests/md2.phpt')
-rw-r--r-- | ext/hash/tests/md2.phpt | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/ext/hash/tests/md2.phpt b/ext/hash/tests/md2.phpt new file mode 100644 index 0000000000..c98ad34054 --- /dev/null +++ b/ext/hash/tests/md2.phpt @@ -0,0 +1,21 @@ +--TEST-- +md2 algorithm +--SKIPIF-- +<?php if(!extension_loaded("hash")) print "skip"; ?> +--FILE-- +<?php +echo hash('md2', '') . "\n"; +echo hash('md2', 'a') . "\n"; +echo hash('md2', 'abc') . "\n"; +echo hash('md2', 'message digest') . "\n"; +echo hash('md2', 'abcdefghijklmnopqrstuvwxyz') . "\n"; +echo hash('md2', 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789') . "\n"; +echo hash('md2', '12345678901234567890123456789012345678901234567890123456789012345678901234567890') . "\n"; +--EXPECT-- +8350e5a3e24c153df2275c9f80692773 +32ec01ec4a6dac72c0ab96fb34c0b5d1 +da853b0d3f88d99b30283a69e6ded6bb +ab4f496bfb2a530b219ff33031fe06b0 +4e8ddff3650292ab5a4108c3aa47940b +da33def2a42df13975352846c30338cd +d5976f79d83d3a0dc9806c3c66f3efd8 |