diff options
author | Mattias Andrée <maandree@kth.se> | 2024-09-01 18:12:21 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2024-09-01 18:12:21 +0200 |
commit | 85b12e691577b4d4fe09b80b06e91a801dc3dfa9 (patch) | |
tree | 69c64bc9a9fc97826fe8cb2d7ef82f00b1193efc /t/keccak_256.c | |
parent | Add support for BLAKE2 (but not tree-hashing) (diff) | |
download | libhashsum-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_256.c')
-rw-r--r-- | t/keccak_256.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/t/keccak_256.c b/t/keccak_256.c new file mode 100644 index 0000000..1ab7a76 --- /dev/null +++ b/t/keccak_256.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, "", "c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"}, + {0, 1, "\xff", "1f9e121db558ff4a6111d06e48b47aa9e8c968222397c5867ed627c82a5bcce4"}, + {0, 1, "\x7f", "1f9e121db558ff4a6111d06e48b47aa9e8c968222397c5867ed627c82a5bcce4"}, + {0, 1, "\x01", "1f9e121db558ff4a6111d06e48b47aa9e8c968222397c5867ed627c82a5bcce4"}, + {0, 1, "\xfe", "c3e5cb55999eeff4e07b7effec77582d0a5a11a94fc268a872493099273992e1"}, + {0, 1, "\x7e", "c3e5cb55999eeff4e07b7effec77582d0a5a11a94fc268a872493099273992e1"}, + {0, 1, "\x00", "c3e5cb55999eeff4e07b7effec77582d0a5a11a94fc268a872493099273992e1"} +}; + + +#else +# define TEST_UNSUPPORTED +# include "../common.h" +#endif + + +int +main(void) +{ + TEST_MAIN("Keccak-256", KECCAK_256); +} |