AUTOMAKE_OPTIONS = foreign
noinst_LIBRARIES = libsymmetric.a
-noinst_PROGRAMS = desTest desdata
+noinst_PROGRAMS = desTest desdata bf_test
# When compiling with lsh, this is set to to -DLSH -I/path/to/lsh/include
# INCLUDES = @crypto_cpp_flags@
-desTest_LDADD = libsymmetric.a
+LDADD = libsymmetric.a
+desdata_LDADD =
des_headers = parity.h rotors.h keymap.h
BUILT_SOURCES = desSmallFips.c desSmallCore.c desQuickFips.c desQuickCore.c \
libsymmetric_a_SOURCES = desCode.h desKerb.c desUtil.c desQuick.c \
$(BUILT_SOURCES) \
- sha.c md5.c idea.c rc4.c cast.c blowfish.c util.c
+ sha.c md5.c idea.c rc4.c cast.c blowfish.c
# Generate DES headers.
$(des_headers): desdata
--- /dev/null
+/* bf_test.c
+ *
+ * $Id$
+ * Test the blow fish implementation. */
+
+#include "blowfish.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+
+int main (int argc, char **argv)
+{
+ if (bf_selftest())
+ {
+ fprintf(stderr, "Blowfish works.\n");
+ exit(EXIT_SUCCESS);
+ }
+ else
+ {
+ fprintf(stderr, "ERROR: Blowfish failed.\n");
+ exit(EXIT_FAILURE);
+ }
+}
+