1 /* RIPEMD160DRIVER.C - test driver for RIPEMD160 */
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/types.h>
22 /* Digests a string and prints the result. */
24 RIPEMD160String(char *string)
28 printf("RIPEMD160 (\"%s\") = %s\n",
29 string, RIPEMD160_Data(string, strlen(string), buf));
32 /* Digests a reference suite of strings and prints the results. */
36 printf("RIPEMD160 test suite:\n");
39 RIPEMD160String("abc");
40 RIPEMD160String("message digest");
41 RIPEMD160String("abcdefghijklmnopqrstuvwxyz");
42 RIPEMD160String("ABCDEFGHIJKLMNOPQRSTUVWXYZ"
43 "abcdefghijklmnopqrstuvwxyz0123456789");
44 RIPEMD160String("1234567890123456789012345678901234567890"
45 "1234567890123456789012345678901234567890");