aboutsummaryrefslogtreecommitdiffstats
path: root/sha3_256.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2024-08-25 23:28:25 +0200
committerMattias Andrée <maandree@kth.se>2024-08-25 23:28:25 +0200
commitb35cea4b8d82a28994351f3b550e8191ee1d94bf (patch)
tree24ce0d8728711e55d5532a57db477b53521f8bc4 /sha3_256.c
downloadanysum-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 'sha3_256.c')
-rw-r--r--sha3_256.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/sha3_256.c b/sha3_256.c
new file mode 100644
index 0000000..fd57a2d
--- /dev/null
+++ b/sha3_256.c
@@ -0,0 +1,28 @@
+/* See LICENSE file for copyright and license details. */
+#ifdef SUPPORT_SHA3
+# define TEST
+# include "common.h"
+
+
+static struct testcase testcases[] = {
+ {1, 0, "", "a7ffc6f8bf1ed76651c14756a061d662f580ff4de43b49fa82d80a4b80f8434a"},
+ {0, 1, "\xff", "83f66216d2cc769e153bafce0181b61a471b4c6a213fc6f59a42985f976f33fe"},
+ {0, 1, "\x7f", "83f66216d2cc769e153bafce0181b61a471b4c6a213fc6f59a42985f976f33fe"},
+ {0, 1, "\x01", "83f66216d2cc769e153bafce0181b61a471b4c6a213fc6f59a42985f976f33fe"},
+ {0, 1, "\xfe", "1b2e61923578e35f3b4629e04a0ff3b73daa571ae01130d9c16ef7da7a4cfdc2"},
+ {0, 1, "\x7e", "1b2e61923578e35f3b4629e04a0ff3b73daa571ae01130d9c16ef7da7a4cfdc2"},
+ {0, 1, "\x00", "1b2e61923578e35f3b4629e04a0ff3b73daa571ae01130d9c16ef7da7a4cfdc2"}
+};
+
+
+#else
+# define TEST_UNSUPPORTED
+# include "common.h"
+#endif
+
+
+int
+main(void)
+{
+ TEST_MAIN("SHA3-256", SHA3_256);
+}