From 85b12e691577b4d4fe09b80b06e91a801dc3dfa9 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 1 Sep 2024 18:12:21 +0200 Subject: Move test files into t/ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- t/sha3_512.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 t/sha3_512.c (limited to 't/sha3_512.c') 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); +} -- cgit v1.2.3-70-g09d2