1 /* SKEINDRIVER.C - test driver for SKEIN */
3 /* Copyright (C) 1990-2, RSA Data Security, Inc. Created 1990. All rights
6 * RSA Data Security, Inc. makes no representations concerning either the
7 * merchantability of this software or the suitability of this software for
8 * any particular purpose. It is provided "as is" without express or implied
9 * warranty of any kind.
11 * These notices must be retained in any copies of any part of this
12 * documentation and/or software. */
14 #include <sys/cdefs.h>
15 __FBSDID("$FreeBSD$");
17 #include <sys/types.h>
25 /* The following makes SKEIN default to SKEIN512 if it has not already been
26 * defined with C compiler flags. */
33 #define SKEIN_Data SKEIN256_Data
36 #define SKEIN_Data SKEIN512_Data
39 #define SKEIN_Data SKEIN1024_Data
42 /* Digests a string and prints the result. */
44 SKEINString(char *string)
48 printf("SKEIN%d (\"%s\") = %s\n",
49 SKEIN, string, SKEIN_Data(string, strlen(string), buf));
52 /* Digests a reference suite of strings and prints the results. */
56 printf("SKEIN%d test suite:\n", SKEIN);
60 SKEINString("message digest");
61 SKEINString("abcdefghijklmnopqrstuvwxyz");
62 SKEINString("ABCDEFGHIJKLMNOPQRSTUVWXYZ"
63 "abcdefghijklmnopqrstuvwxyz0123456789");
64 SKEINString("1234567890123456789012345678901234567890"
65 "1234567890123456789012345678901234567890");