diff options
author | Mattias Andrée <maandree@kth.se> | 2024-08-25 23:28:25 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2024-08-25 23:28:25 +0200 |
commit | b35cea4b8d82a28994351f3b550e8191ee1d94bf (patch) | |
tree | 24ce0d8728711e55d5532a57db477b53521f8bc4 /sha3_512.c | |
download | anysum-b35cea4b8d82a28994351f3b550e8191ee1d94bf.tar.gz anysum-b35cea4b8d82a28994351f3b550e8191ee1d94bf.tar.bz2 anysum-b35cea4b8d82a28994351f3b550e8191ee1d94bf.tar.xz |
First commit
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | sha3_512.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/sha3_512.c b/sha3_512.c new file mode 100644 index 0000000..b05f680 --- /dev/null +++ b/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); +} |