summaryrefslogtreecommitdiff
path: root/regress/bin/md5
diff options
context:
space:
mode:
authorDavid Krause <david@cvs.openbsd.org>2010-08-08 20:15:33 +0000
committerDavid Krause <david@cvs.openbsd.org>2010-08-08 20:15:33 +0000
commit4fbe8ffdef34f9c377084f6aeaad132079c60086 (patch)
tree4f0770d1356ff1d45b1c6d2126ec7fc8245a85d9 /regress/bin/md5
parent3138c836065570fb9bcb21c8dea0bacc9ed552f6 (diff)
remove rmd160 and add cksum, sha256, and sum while here
phessler@ deraadt@
Diffstat (limited to 'regress/bin/md5')
-rw-r--r--regress/bin/md5/Makefile14
-rw-r--r--regress/bin/md5/testsuite.cksum10
-rw-r--r--regress/bin/md5/testsuite.rmd16010
-rw-r--r--regress/bin/md5/testsuite.sha25610
-rw-r--r--regress/bin/md5/testsuite.sum10
5 files changed, 40 insertions, 14 deletions
diff --git a/regress/bin/md5/Makefile b/regress/bin/md5/Makefile
index fb15e9b5eb8..92c105c0963 100644
--- a/regress/bin/md5/Makefile
+++ b/regress/bin/md5/Makefile
@@ -1,16 +1,22 @@
-# $OpenBSD: Makefile,v 1.4 2002/09/02 20:01:43 avsm Exp $
+# $OpenBSD: Makefile,v 1.5 2010/08/08 20:15:32 david Exp $
-REGRESS_TARGETS=md5 sha1 rmd160 md5_string_vs_files md5_pipe
+REGRESS_TARGETS=cksum md5 sha1 sha256 sum md5_string_vs_files md5_pipe
REGRESS_TARGETS+=md5_pipe_vs_file md5_multiple_files
+cksum:
+ cksum -x | cmp -s ${.CURDIR}/testsuite.cksum /dev/stdin
+
md5:
md5 -x | cmp -s ${.CURDIR}/testsuite.md5 /dev/stdin
sha1:
sha1 -x | cmp -s ${.CURDIR}/testsuite.sha1 /dev/stdin
-rmd160:
- rmd160 -x | cmp -s ${.CURDIR}/testsuite.rmd160 /dev/stdin
+sha256:
+ sha256 -x | cmp -s ${.CURDIR}/testsuite.sha256 /dev/stdin
+
+sum:
+ sum -x | cmp -s ${.CURDIR}/testsuite.sum /dev/stdin
# shouldn't allow files on the command line along with '-s'
md5_string_vs_files:
diff --git a/regress/bin/md5/testsuite.cksum b/regress/bin/md5/testsuite.cksum
new file mode 100644
index 00000000000..64bd4695998
--- /dev/null
+++ b/regress/bin/md5/testsuite.cksum
@@ -0,0 +1,10 @@
+CKSUM test suite:
+4294967295 0
+1220704766 1 a
+1219131554 3 abc
+3644109718 14 message digest
+2713270184 26 abcdefghijklmnopqrstuvwxyz
+2547199108 56 abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq
+81918263 62 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
+1939911592 80 12345678901234567890123456789012345678901234567890123456789012345678901234567890
+3401932319 1000000 one million 'a' characters
diff --git a/regress/bin/md5/testsuite.rmd160 b/regress/bin/md5/testsuite.rmd160
deleted file mode 100644
index 4a3f111813e..00000000000
--- a/regress/bin/md5/testsuite.rmd160
+++ /dev/null
@@ -1,10 +0,0 @@
-RMD160 test suite:
-RMD160 ("") = 9c1185a5c5e9fc54612808977ee8f548b2258d31
-RMD160 ("a") = 0bdc9d2d256b3ee9daae347be6f4dc835a467ffe
-RMD160 ("abc") = 8eb208f7e05d987a9b044a8e98c6b087f15a0bfc
-RMD160 ("message digest") = 5d0689ef49d2fae572b881b123a85ffa21595f36
-RMD160 ("abcdefghijklmnopqrstuvwxyz") = f71c27109c692c1b56bbdceb5b9d2865b3708dbc
-RMD160 ("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq") = 12a053384a9c0c88e405a06c27dcf49ada62eb2b
-RMD160 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") = b0e20b6e3116640286ed3a87a5713079b21f5189
-RMD160 ("12345678901234567890123456789012345678901234567890123456789012345678901234567890") = 9b752e45573d4b39f4dbd3323cab82bf63326bfb
-RMD160 (one million 'a' characters) = 52783243c1697bdbe16d37f97f68f08325dc1528
diff --git a/regress/bin/md5/testsuite.sha256 b/regress/bin/md5/testsuite.sha256
new file mode 100644
index 00000000000..0b77c4b4e12
--- /dev/null
+++ b/regress/bin/md5/testsuite.sha256
@@ -0,0 +1,10 @@
+SHA256 test suite:
+SHA256 ("") = e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
+SHA256 ("a") = ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb
+SHA256 ("abc") = ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
+SHA256 ("message digest") = f7846f55cf23e14eebeab5b4e1550cad5b509e3348fbc4efa3a1413d393cb650
+SHA256 ("abcdefghijklmnopqrstuvwxyz") = 71c480df93d6ae2f1efad1447c66c9525e316218cf51fc8d9ed832f2daf18b73
+SHA256 ("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq") = 248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1
+SHA256 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789") = db4bfcbd4da0cd85a60c3c37d3fbd8805c77f15fc6b1fdfe614ee0a7c8fdb4c0
+SHA256 ("12345678901234567890123456789012345678901234567890123456789012345678901234567890") = f371bc4a311f2b009eef952dd83ca80e2b60026c8e935592d0f9c308453c813e
+SHA256 (one million 'a' characters) = cdc76e5c9914fb9281a1c7e284d73e67f1809a48a497200e046d39ccc7112cd0
diff --git a/regress/bin/md5/testsuite.sum b/regress/bin/md5/testsuite.sum
new file mode 100644
index 00000000000..39ad979cb2f
--- /dev/null
+++ b/regress/bin/md5/testsuite.sum
@@ -0,0 +1,10 @@
+SUM test suite:
+0 0
+97 1 a
+16556 1 abc
+26423 1 message digest
+53553 1 abcdefghijklmnopqrstuvwxyz
+54802 1 abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq
+25587 1 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
+21845 1 12345678901234567890123456789012345678901234567890123456789012345678901234567890
+62769 977 one million 'a' characters