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 #include <sys/types.h>
26 /* The following makes SKEIN default to SKEIN512 if it has not already been
27 * defined with C compiler flags. */
34 #define SKEIN_Data SKEIN256_Data
37 #define SKEIN_Data SKEIN512_Data
40 #define SKEIN_Data SKEIN1024_Data
43 /* Digests a string and prints the result. */
45 SKEINString(char *string)
49 printf("SKEIN%d (\"%s\") = %s\n",
50 SKEIN, string, SKEIN_Data(string, strlen(string), buf));
53 /* Digests a reference suite of strings and prints the results. */
57 printf("SKEIN%d test suite:\n", SKEIN);
61 SKEINString("message digest");
62 SKEINString("abcdefghijklmnopqrstuvwxyz");
63 SKEINString("ABCDEFGHIJKLMNOPQRSTUVWXYZ"
64 "abcdefghijklmnopqrstuvwxyz0123456789");
65 SKEINString("1234567890123456789012345678901234567890"
66 "1234567890123456789012345678901234567890");