symm/: Eliminate the remaining checked-in stubby source files.
[catacomb] / symm / sha512.c
index d4df182..04b0a9d 100644 (file)
@@ -331,10 +331,31 @@ unsigned long sha512_state(sha512_ctx *ctx, void *state)
 
 /* --- Generic interface --- */
 
-GHASH_DEF(SHA512, sha512)
+#define HASHES(_)                                                      \
+  _(SHA384, sha384, "sha384")                                          \
+  _(SHA512, sha512, "sha512")
 
-/* --- Test code --- */
+HASHES(GHASH_DEFX)
 
-HASH_TEST(SHA512, sha512)
+/*----- Test rig ----------------------------------------------------------*/
+
+#ifdef TEST_RIG
+
+#include <mLib/testrig.h>
+
+HASHES(HASH_VERIFYX)
+
+static const test_chunk defs[] = {
+  HASHES(HASH_TESTDEFSX)
+  { 0, 0, { 0 } }
+};
+
+int main(int argc, char *argv[])
+{
+  test_run(argc, argv, defs, SRCDIR "/t/sha512");
+  return (0);
+}
+
+#endif
 
 /*----- That's all, folks -------------------------------------------------*/