Skip to content
Snippets Groups Projects
Commit 8ecce37d authored by Niels Möller's avatar Niels Möller
Browse files

Test program för blowfish.

Rev: src/symmetric/Makefile.am.in:1.5
Rev: src/symmetric/bf_test.c:1.1
parent 80f8059e
Branches
Tags
No related merge requests found
...@@ -5,12 +5,13 @@ BODY: ...@@ -5,12 +5,13 @@ BODY:
AUTOMAKE_OPTIONS = foreign AUTOMAKE_OPTIONS = foreign
noinst_LIBRARIES = libsymmetric.a 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 # When compiling with lsh, this is set to to -DLSH -I/path/to/lsh/include
# INCLUDES = @crypto_cpp_flags@ # INCLUDES = @crypto_cpp_flags@
desTest_LDADD = libsymmetric.a LDADD = libsymmetric.a
desdata_LDADD =
des_headers = parity.h rotors.h keymap.h des_headers = parity.h rotors.h keymap.h
BUILT_SOURCES = desSmallFips.c desSmallCore.c desQuickFips.c desQuickCore.c \ BUILT_SOURCES = desSmallFips.c desSmallCore.c desQuickFips.c desQuickCore.c \
...@@ -18,7 +19,7 @@ BUILT_SOURCES = desSmallFips.c desSmallCore.c desQuickFips.c desQuickCore.c \ ...@@ -18,7 +19,7 @@ BUILT_SOURCES = desSmallFips.c desSmallCore.c desQuickFips.c desQuickCore.c \
libsymmetric_a_SOURCES = desCode.h desKerb.c desUtil.c desQuick.c \ libsymmetric_a_SOURCES = desCode.h desKerb.c desUtil.c desQuick.c \
$(BUILT_SOURCES) \ $(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. # Generate DES headers.
$(des_headers): desdata $(des_headers): desdata
......
/* 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);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment