From 05db2a53dfb93cb8ec292af2019cabcf82ca6670 Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan Date: Sun, 8 Jan 2012 21:06:07 +0300 Subject: [PATCH] crhash: sha1: add test vectors --- t/sha1-001.m | 1 + t/sha1-001.sha1 | 1 + t/sha1-002.m | 1 + t/sha1-002.sha1 | 1 + test.sh | 2 +- 5 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 t/sha1-001.m create mode 100644 t/sha1-001.sha1 create mode 100644 t/sha1-002.m create mode 100644 t/sha1-002.sha1 diff --git a/t/sha1-001.m b/t/sha1-001.m new file mode 100644 index 0000000..f2ba8f8 --- /dev/null +++ b/t/sha1-001.m @@ -0,0 +1 @@ +abc \ No newline at end of file diff --git a/t/sha1-001.sha1 b/t/sha1-001.sha1 new file mode 100644 index 0000000..215b48e --- /dev/null +++ b/t/sha1-001.sha1 @@ -0,0 +1 @@ +a9993e364706816aba3e25717850c26c9cd0d89d diff --git a/t/sha1-002.m b/t/sha1-002.m new file mode 100644 index 0000000..199f24e --- /dev/null +++ b/t/sha1-002.m @@ -0,0 +1 @@ +abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq \ No newline at end of file diff --git a/t/sha1-002.sha1 b/t/sha1-002.sha1 new file mode 100644 index 0000000..c585b45 --- /dev/null +++ b/t/sha1-002.sha1 @@ -0,0 +1 @@ +84983e441c3bd26ebaae4aa1f95129e5e54670f1 diff --git a/test.sh b/test.sh index bcb3416..2ba36d9 100755 --- a/test.sh +++ b/test.sh @@ -1,6 +1,6 @@ #!/bin/sh cd t -for T in md5 whirlpool; do +for T in md5 sha1 whirlpool; do for M in $T-*.m; do DIGEST1=$(../crhash -t $T $M) DIGEST2=$(cat $(basename $M .m).$T) -- 2.11.4.GIT