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/cdefs.h>
15 __FBSDID("$FreeBSD$");
17 #include <sys/types.h>
25 /* Digests a string and prints the result. */
27 RIPEMD160String(char *string)
31 printf("RIPEMD160 (\"%s\") = %s\n",
32 string, RIPEMD160_Data(string, strlen(string), buf));
35 /* Digests a reference suite of strings and prints the results. */
39 printf("RIPEMD160 test suite:\n");
42 RIPEMD160String("abc");
43 RIPEMD160String("message digest");
44 RIPEMD160String("abcdefghijklmnopqrstuvwxyz");
45 RIPEMD160String("ABCDEFGHIJKLMNOPQRSTUVWXYZ"
46 "abcdefghijklmnopqrstuvwxyz0123456789");
47 RIPEMD160String("1234567890123456789012345678901234567890"
48 "1234567890123456789012345678901234567890");