aboutsummaryrefslogtreecommitdiffstats
path: root/t/ripemd-128.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2024-09-01 18:12:21 +0200
committerMattias Andrée <maandree@kth.se>2024-09-01 18:12:21 +0200
commit85b12e691577b4d4fe09b80b06e91a801dc3dfa9 (patch)
tree69c64bc9a9fc97826fe8cb2d7ef82f00b1193efc /t/ripemd-128.c
parentAdd support for BLAKE2 (but not tree-hashing) (diff)
downloadlibhashsum-85b12e691577b4d4fe09b80b06e91a801dc3dfa9.tar.gz
libhashsum-85b12e691577b4d4fe09b80b06e91a801dc3dfa9.tar.bz2
libhashsum-85b12e691577b4d4fe09b80b06e91a801dc3dfa9.tar.xz
Move test files into t/
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 't/ripemd-128.c')
-rw-r--r--t/ripemd-128.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/t/ripemd-128.c b/t/ripemd-128.c
new file mode 100644
index 0000000..199bdcf
--- /dev/null
+++ b/t/ripemd-128.c
@@ -0,0 +1,36 @@
+/* See LICENSE file for copyright and license details. */
+#ifdef SUPPORT_RIPEMD_128
+# define TEST
+# include "../common.h"
+
+
+static struct testcase testcases[] = {
+ {1, 0, "", "cdf26213a150dc3ecb610f18f6b38b46"},
+ {1, 0, "a", "86be7afa339d0fc7cfc785e72f578d33"},
+ {1, 0, "abc", "c14a12199c66e4ba84636b0f69144c77"},
+ {1, 0, "message digest", "9e327b3d6e523062afc1132d7df9d1b8"},
+ {1, 0, "abcdefghijklmnopqrstuvwxyz", "fd2aa607f71dc8f510714922b371834e"},
+ {1, 0, "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", "a1aa0689d0fafa2ddc22e88b49133a06"},
+ {1, 0, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", "d1e959eb179c911faea4624c60c5c702"},
+ {8, 0, "1234567890", "3f45ef194732c2dbb2c4a2c769795fa3"},
+ {1000000UL, 0, "a", "4a7f5723f954eba1216c9d8f6320431f"},
+ {0, 1, "\xff", "2b4535a3d10c346e06cacff50db484ca"},
+ {0, 1, "\x7f", "2b4535a3d10c346e06cacff50db484ca"},
+ {0, 1, "\x01", "2b4535a3d10c346e06cacff50db484ca"},
+ {0, 1, "\xfe", "431f5ff8e69c47afd0212863079ce205"},
+ {0, 1, "\x7e", "431f5ff8e69c47afd0212863079ce205"},
+ {0, 1, "\x00", "431f5ff8e69c47afd0212863079ce205"}
+};
+
+
+#else
+# define TEST_UNSUPPORTED
+# include "../common.h"
+#endif
+
+
+int
+main(void)
+{
+ TEST_MAIN("RIPEMD-128", RIPEMD_128);
+}