/* -*-c-*-
*
- * $Id: blkc.h,v 1.3 2000/06/17 10:47:06 mdw Exp $
+ * $Id: blkc.h,v 1.4 2001/04/29 17:39:15 mdw Exp $
*
* Common definitions for block ciphers
*
/*----- Revision history --------------------------------------------------*
*
* $Log: blkc.h,v $
+ * Revision 1.4 2001/04/29 17:39:15 mdw
+ * Removed `-sched' tests. Reorganized so that we can theoretically have
+ * multiple tests in the same file. (This isn't so useful in production,
+ * but it's handy when doing test builds.)
+ *
* Revision 1.3 2000/06/17 10:47:06 mdw
* Slight support for 96-bit ciphers. Support for counter-mode ciphers.
*
#include <mLib/quis.h>
#include <mLib/testrig.h>
-#define BLKC_TEST(PRE, pre) \
+#define BLKC_VERIFY(PRE, pre) \
\
-static int verify(dstr *v) \
+static int pre##_verify(dstr *v) \
{ \
pre##_ctx k; \
uint32 p[PRE##_BLKSZ / 4]; \
/* --- Return --- */ \
\
return (ok); \
-} \
+}
+
+#define BLKC_TEST(PRE, pre) \
+ \
+BLKC_VERIFY(PRE, pre) \
\
static test_chunk defs[] = { \
- { #pre, verify, { &type_hex, &type_hex, &type_hex, 0 } }, \
- { #pre "-sched", verify, { &type_hex, &type_hex, &type_hex, 0 } }, \
+ { #pre, pre##_verify, { &type_hex, &type_hex, &type_hex, 0 } }, \
{ 0, 0, { 0 } } \
}; \
\
}
#else
+# define BLKC_VERIFY(PRE, pre)
# define BLKC_TEST(PRE, pre)
#endif