- Test m_pkthdr.fw_flags against DUMMYNET_MBUF_TAGGED before trying to locate
[dragonfly/netmp.git] / lib / libmd / rmddriver.c
blob05613e419884ede235b209d81d7b7c6195931810
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 $
4 */
6 /* Copyright (C) 1990-2, RSA Data Security, Inc. Created 1990. All
7 rights reserved.
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>
20 #include <stdio.h>
21 #include <time.h>
22 #include <string.h>
23 #include "ripemd.h"
25 /* Digests a string and prints the result.
27 static void RIPEMD160String (string)
28 char *string;
30 char buf[2*20+1];
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.
38 main()
40 printf ("RIPEMD160 test suite:\n");
42 RIPEMD160String ("");
43 RIPEMD160String ("abc");
44 RIPEMD160String ("message digest");
45 RIPEMD160String ("abcdefghijklmnopqrstuvwxyz");
46 RIPEMD160String
47 ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789");
48 RIPEMD160String
49 ("1234567890123456789012345678901234567890\
50 1234567890123456789012345678901234567890");
51 return 0;