1 /* RIPEMD160DRIVER.C - test driver for RIPEMD160
2 * $FreeBSD: src/lib/libmd/rmddriver.c,v 1.2 1999/08/28 00:05:08 peter Exp $
3 * $DragonFly: src/lib/libmd/rmddriver.c,v 1.2 2003/06/17 04:26:50 dillon 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 (string
)
32 printf ("RIPEMD160 (\"%s\") = %s\n",
33 string
, RIPEMD160_Data(string
,strlen(string
),buf
));
36 /* Digests a reference suite of strings and prints the results.
40 printf ("RIPEMD160 test suite:\n");
43 RIPEMD160String ("abc");
44 RIPEMD160String ("message digest");
45 RIPEMD160String ("abcdefghijklmnopqrstuvwxyz");
47 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");
49 ("1234567890123456789012345678901234567890\
50 1234567890123456789012345678901234567890");