symm/: Eliminate the remaining checked-in stubby source files.
[catacomb] / symm / sha256.c
index a8796d3..cecab25 100644 (file)
@@ -324,10 +324,31 @@ unsigned long sha256_state(sha256_ctx *ctx, void *state)
 
 /* --- Generic interface --- */
 
-GHASH_DEF(SHA256, sha256)
+#define HASHES(_)                                                      \
+  _(SHA224, sha224)                                                    \
+  _(SHA256, sha256)
 
-/* --- Test code --- */
+HASHES(GHASH_DEF)
 
-HASH_TEST(SHA256, sha256)
+/*----- Test rig ----------------------------------------------------------*/
+
+#ifdef TEST_RIG
+
+#include <mLib/testrig.h>
+
+HASHES(HASH_VERIFY)
+
+static const test_chunk defs[] = {
+  HASHES(HASH_TESTDEFS)
+  { 0, 0, { 0 } }
+};
+
+int main(int argc, char *argv[])
+{
+  test_run(argc, argv, defs, SRCDIR "/t/sha256");
+  return (0);
+}
+
+#endif
 
 /*----- That's all, folks -------------------------------------------------*/