~mdw
/
catacomb
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
math/Makefile.am, symm/Makefile.am: Use `--no-install' on oddball tests.
[catacomb]
/
symm
/
ecb-def.h
diff --git
a/symm/ecb-def.h
b/symm/ecb-def.h
index
9f50292
..
568ffa1
100644
(file)
--- a/
symm/ecb-def.h
+++ b/
symm/ecb-def.h
@@
-65,7
+65,9
@@
* Use: Creates an implementation for ECB stealing mode.
*/
* Use: Creates an implementation for ECB stealing mode.
*/
-#define ECB_DEF(PRE, pre) \
+#define ECB_DEF(PRE, pre) ECB_DEFX(PRE, pre, #pre, #pre)
+
+#define ECB_DEFX(PRE, pre, name, fname) \
\
/* --- @pre_ecbsetkey@ --- * \
* \
\
/* --- @pre_ecbsetkey@ --- * \
* \
@@
-354,14
+356,16
@@
static const gcipher_ops gops = { \
}; \
\
const gccipher pre##_ecb = { \
}; \
\
const gccipher pre##_ecb = { \
-
#pr
e "-ecb", pre##_keysz, PRE##_BLKSZ, \
+
nam
e "-ecb", pre##_keysz, PRE##_BLKSZ, \
ginit \
}; \
\
ginit \
}; \
\
-ECB_TEST
(PRE, pr
e)
+ECB_TEST
X(PRE, pre, name, fnam
e)
/*----- Test rig ----------------------------------------------------------*/
/*----- Test rig ----------------------------------------------------------*/
+#define ECB_TEST(PRE, pre) ECB_TESTX(PRE, pre, #pre, #pre)
+
#ifdef TEST_RIG
#include <stdio.h>
#ifdef TEST_RIG
#include <stdio.h>
@@
-375,7
+379,7
@@
ECB_TEST(PRE, pre)
* Use: Standard test rig for ECB functions.
*/
* Use: Standard test rig for ECB functions.
*/
-#define ECB_TEST
(PRE, pre)
\
+#define ECB_TEST
X(PRE, pre, name, fname)
\
\
/* --- Initial plaintext for the test --- */ \
\
\
/* --- Initial plaintext for the test --- */ \
\
@@
-411,7
+415,7
@@
int main(void) \
size_t keysz = PRE##_KEYSZ ? \
PRE##_KEYSZ : strlen((const char *)key); \
\
size_t keysz = PRE##_KEYSZ ? \
PRE##_KEYSZ : strlen((const char *)key); \
\
- fputs(
#pr
e "-ecb: ", stdout); \
+ fputs(
nam
e "-ecb: ", stdout); \
\
pre##_ecbinit(&ctx, key, keysz, iv); \
\
\
pre##_ecbinit(&ctx, key, keysz, iv); \
\
@@
-459,7
+463,7
@@
int main(void) \
}
#else
}
#else
-# define ECB_TEST
(PRE, pr
e)
+# define ECB_TEST
X(PRE, pre, name, fnam
e)
#endif
/*----- That's all, folks -------------------------------------------------*/
#endif
/*----- That's all, folks -------------------------------------------------*/