math/mpx-mul4-*.S: Use more portable type syntax for ambiguous instructions.
[catacomb] / symm / safer.c
index 8dd31cb..569eb83 100644 (file)
@@ -59,8 +59,8 @@ extern const octet safer_s[256], safer_si[256];
  *
  * Returns:    ---
  *
- * Use:                Initializes an SAFER expanded key.  A default number of
- *             rounds is chosen, based on the key length.
+ * Use:                Initializes an SAFER expanded key, with lots of options
+ *             controlling how to do it.
  */
 
 struct ksched {
@@ -252,7 +252,6 @@ void safersk_init(safer_ctx *k, const void *buf, size_t sz)
   KXS(k, a, b, c, d, e, f, g, h);                                      \
 } while (0)
 
-
 void safer_eblk(const safer_ctx *k, const uint32 *src, uint32 *dst)
 {
   octet a, b, c, d, e, f, g, h;
@@ -319,6 +318,29 @@ void safer_dblk(const safer_ctx *k, const uint32 *src, uint32 *dst)
   PACK(dst, a, b, c, d, e, f, g, h);
 }
 
-BLKC_TEST(SAFER, safer)
+/*----- Test rig ----------------------------------------------------------*/
+
+#ifdef TEST_RIG
+
+#include <mLib/testrig.h>
+
+#define CIPHERS(_)                                                     \
+  _(SAFER, safer)                                                      \
+  _(SAFERSK, safersk)
+
+CIPHERS(BLKC_VERIFY)
+
+static const test_chunk defs[] = {
+  CIPHERS(BLKC_TESTDEFS)
+  { 0, 0, { 0 } }
+};
+
+int main(int argc, char *argv[])
+{
+  test_run(argc, argv, defs, SRCDIR "/t/safer");
+  return (0);
+}
+
+#endif
 
 /*----- That's all, folks -------------------------------------------------*/