aboutsummaryrefslogtreecommitdiffstats
path: root/t/md2.c
diff options
context:
space:
mode:
Diffstat (limited to 't/md2.c')
-rw-r--r--t/md2.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/t/md2.c b/t/md2.c
new file mode 100644
index 0000000..e5f12d0
--- /dev/null
+++ b/t/md2.c
@@ -0,0 +1,33 @@
+/* See LICENSE file for copyright and license details. */
+#ifdef SUPPORT_MD2
+# define TEST
+# define NO_CUSTOM_HASH_BUFFER_SUPPORT
+# include "../common.h"
+
+
+static struct testcase testcases[] = {
+ {1, 0, "The quick brown fox jumps over the lazy dog", "03d85a0d629d2c442e987525319fc471"},
+ {1, 0, "The quick brown fox jumps over the lazy cog", "6b890c9292668cdbbfda00a4ebf31f05"},
+ {1, 0, "", "8350e5a3e24c153df2275c9f80692773"},
+ {1, 0, "a", "32ec01ec4a6dac72c0ab96fb34c0b5d1"},
+ {1, 0, "abc", "da853b0d3f88d99b30283a69e6ded6bb"},
+ {1, 0, "message digest", "ab4f496bfb2a530b219ff33031fe06b0"},
+ {1, 0, "abcdefghijklmnopqrstuvwxyz", "4e8ddff3650292ab5a4108c3aa47940b"},
+ {1, 0, "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", "da33def2a42df13975352846c30338cd"},
+ {1, 0, "12345678901234567890123456789012345678901234567890123456789012345678901234567890", "d5976f79d83d3a0dc9806c3c66f3efd8"},
+ {1, 0, "1234567890123456789012345678901234567890123456789012345678901234", "1a07a94849157fc19442f42e84225ebd"},
+ {1000000UL, 0, "a", NULL}
+};
+
+
+#else
+# define TEST_UNSUPPORTED
+# include "../common.h"
+#endif
+
+
+int
+main(void)
+{
+ TEST_MAIN("MD2", MD2);
+}