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/sha3_512.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/sha3_512.c')
-rw-r--r-- | t/sha3_512.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/t/sha3_512.c b/t/sha3_512.c new file mode 100644 index 0000000..356516f --- /dev/null +++ b/t/sha3_512.c @@ -0,0 +1,42 @@ +/* See LICENSE file for copyright and license details. */ +#ifdef SUPPORT_SHA3 +# define TEST +# include "../common.h" + + +static struct testcase testcases[] = { + {1, 0, "", + "a69f73cca23a9ac5c8b567dc185a756e97c982164fe25859e0d1dcc1475c80a6" + "15b2123af1f5f94c11e3e9402c3ac558f500199d95b6d3e301758586281dcd26"}, + {0, 1, "\xff", + "0580220015f6b256328efe4d4af7ebd85187c42fe52fdc82ecc6ff5cee7c8473" + "f4a1911073ab7598eb41c6095ecfa05c1e148f726c3d474d66d1e4bcc191923c"}, + {0, 1, "\x7f", + "0580220015f6b256328efe4d4af7ebd85187c42fe52fdc82ecc6ff5cee7c8473" + "f4a1911073ab7598eb41c6095ecfa05c1e148f726c3d474d66d1e4bcc191923c"}, + {0, 1, "\x01", + "0580220015f6b256328efe4d4af7ebd85187c42fe52fdc82ecc6ff5cee7c8473" + "f4a1911073ab7598eb41c6095ecfa05c1e148f726c3d474d66d1e4bcc191923c"}, + {0, 1, "\xfe", + "57600f99901ad7c7232e520a20097cf37c48257b51b7a69a570b2bb9535a7253" + "b8240318cc0e5ab990b3f1b6e8e7e7b16d43936416abe2eb9f84fdbe0f41e0f2"}, + {0, 1, "\x7e", + "57600f99901ad7c7232e520a20097cf37c48257b51b7a69a570b2bb9535a7253" + "b8240318cc0e5ab990b3f1b6e8e7e7b16d43936416abe2eb9f84fdbe0f41e0f2"}, + {0, 1, "\x00", + "57600f99901ad7c7232e520a20097cf37c48257b51b7a69a570b2bb9535a7253" + "b8240318cc0e5ab990b3f1b6e8e7e7b16d43936416abe2eb9f84fdbe0f41e0f2"} +}; + + +#else +# define TEST_UNSUPPORTED +# include "../common.h" +#endif + + +int +main(void) +{ + TEST_MAIN("SHA3-512", SHA3_512); +} |