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