aboutsummaryrefslogtreecommitdiffstats
path: root/t/keccak_224.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/keccak_224.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/keccak_224.c')
-rw-r--r--t/keccak_224.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/t/keccak_224.c b/t/keccak_224.c
new file mode 100644
index 0000000..2120d1c
--- /dev/null
+++ b/t/keccak_224.c
@@ -0,0 +1,28 @@
+/* See LICENSE file for copyright and license details. */
+#ifdef SUPPORT_KECCAK
+# define TEST
+# include "../common.h"
+
+
+static struct testcase testcases[] = {
+ {1, 0, "", "f71837502ba8e10837bdd8d365adb85591895602fc552b48b7390abd"},
+ {0, 1, "\xff", "c4ab876a7f74504cb63158562f7a8f855dfde3c6f005a3f2e8feed0d"},
+ {0, 1, "\x7f", "c4ab876a7f74504cb63158562f7a8f855dfde3c6f005a3f2e8feed0d"},
+ {0, 1, "\x01", "c4ab876a7f74504cb63158562f7a8f855dfde3c6f005a3f2e8feed0d"},
+ {0, 1, "\xfe", "860e3ec314c5cbf19c1a4314e9ea8cb85cecd18bd850b42f5c6f2a07"},
+ {0, 1, "\x7e", "860e3ec314c5cbf19c1a4314e9ea8cb85cecd18bd850b42f5c6f2a07"},
+ {0, 1, "\x00", "860e3ec314c5cbf19c1a4314e9ea8cb85cecd18bd850b42f5c6f2a07"}
+};
+
+
+#else
+# define TEST_UNSUPPORTED
+# include "../common.h"
+#endif
+
+
+int
+main(void)
+{
+ TEST_MAIN("Keccak-224", KECCAK_224);
+}