aboutsummaryrefslogtreecommitdiffstats
path: root/sha_224.c
diff options
context:
space:
mode:
Diffstat (limited to 'sha_224.c')
-rw-r--r--sha_224.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/sha_224.c b/sha_224.c
new file mode 100644
index 0000000..3634da9
--- /dev/null
+++ b/sha_224.c
@@ -0,0 +1,28 @@
+/* See LICENSE file for copyright and license details. */
+#define TEST
+#include "common.h"
+
+
+static struct testcase testcases[] = {
+ {1, 0, "", "d14a028c2a3a2bc9476102bb288234c415a2b01f828ea62ac5b3e42f"},
+ {1, 0, "\xff", "e33f9d75e6ae1369dbabf81b96b4591ae46bba30b591a6b6c62542b5"},
+ {1, 0, "\xe5\xe0\x99$", "fd19e74690d291467ce59f077df311638f1c3a46e510d0e49a67062d"},
+ {56UL, 8, "\0", "5c3e25b69d0ea26f260cfae87e23759e1eca9d1ecc9fbf3c62266804"},
+ {1000UL, 0, "Q", "3706197f66890a41779dc8791670522e136fafa24874685715bd0a8a"},
+ {1000UL, 0, "A", "a8d0c66b5c6fdfd836eb3c6d04d32dfe66c3b1f168b488bf4c9c66ce"},
+ {1005UL, 0, "\x99", "cb00ecd03788bf6c0908401e0eb053ac61f35e7e20a2cfd7bd96d640"},
+ {1000000UL, 8, "\0", "3a5d74b68f14f3a4b2be9289b8d370672d0b3d2f53bc303c59032df3"},
+ {0x20000000UL, 0, "A", "c4250083cf8230bf21065b3014baaaf9f76fecefc21f91cf237dedc9"},
+ {0x41000000UL, 8, "\0", "014674abc5cb980199935695af22fab683748f4261d4c6492b77c543"},
+ {0x6000003FUL, 0, "\x84", "a654b50b767a8323c5b519f467d8669837142881dc7ad368a7d5ef8f"},
+ {1, 0, "abc", "23097d223405d8228642a477bda255b32aadbce4bda0b3f7e36c9da7"},
+ {1, 0, "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
+ "75388b16512776cc5dba5da1fd890150b0c6455cb4f58b1952522525"}
+};
+
+
+int
+main(void)
+{
+ TEST_MAIN("SHA-224", SHA_224);
+}