summaryrefslogtreecommitdiff
path: root/bf_test.c
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>1998-12-16 02:09:13 +0100
committerNiels Möller <nisse@lysator.liu.se>1998-12-16 02:09:13 +0100
commit8ecce37df14274b6830e6ece08c8c696969f32d3 (patch)
tree9951035b6c688a07ca422ed5030dcfd7ac80475e /bf_test.c
parent80f8059e683ffe599cab57e59ca403b9da6d8f3b (diff)
downloadnettle-8ecce37df14274b6830e6ece08c8c696969f32d3.tar.gz
Test program för blowfish.
Rev: src/symmetric/Makefile.am.in:1.5 Rev: src/symmetric/bf_test.c:1.1
Diffstat (limited to 'bf_test.c')
-rw-r--r--bf_test.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/bf_test.c b/bf_test.c
new file mode 100644
index 00000000..74ce6243
--- /dev/null
+++ b/bf_test.c
@@ -0,0 +1,24 @@
+/* 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);
+ }
+}
+