1 /* RIPEMD160DRIVER.C - test driver for RIPEMD160
2 * $FreeBSD: src/lib/libmd/rmddriver.c,v 1.3 2001/09/30 21:56:22 dillon Exp $
3 * $DragonFly: src/lib/libmd/rmddriver.c,v 1.3 2008/09/11 20:25:34 swildner Exp $
6 /* Copyright (C) 1990-2, RSA Data Security, Inc. Created 1990. All
9 RSA Data Security, Inc. makes no representations concerning either
10 the merchantability of this software or the suitability of this
11 software for any particular purpose. It is provided "as is"
12 without express or implied warranty of any kind.
14 These notices must be retained in any copies of any part of this
15 documentation and/or software.
18 #include <sys/types.h>
25 /* Digests a string and prints the result.
27 static void 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");
46 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");
48 ("1234567890123456789012345678901234567890\
49 1234567890123456789012345678901234567890");