Import of tac_plus.v8.tar.gz: 173206 bytes, md5:
[tac_plus.git] / md5.h
1 /* 
2    Copyright (c) 1995-1998 by Cisco systems, Inc.
3
4    Permission to use, copy, modify, and distribute this software for
5    any purpose and without fee is hereby granted, provided that this
6    copyright and permission notice appear on all copies of the
7    software and supporting documentation, the name of Cisco Systems,
8    Inc. not be used in advertising or publicity pertaining to
9    distribution of the program without specific prior permission, and
10    notice be given in supporting documentation that modification,
11    copying and distribution is by permission of Cisco Systems, Inc.
12
13    Cisco Systems, Inc. makes no representations about the suitability
14    of this software for any purpose.  THIS SOFTWARE IS PROVIDED ``AS
15    IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
16    WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
17    FITNESS FOR A PARTICULAR PURPOSE.
18 */
19
20
21 /*
22  * MD5.H - header file for MD5C.C
23  */
24
25 /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
26  * rights reserved.
27  *
28  * License to copy and use this software is granted provided that it
29  * is identified as the "RSA Data Security, Inc. MD5 Message-Digest
30  * Algorithm" in all material mentioning or referencing this software
31  * or this function.
32  *
33  * License is also granted to make and use derivative works provided
34  * that such works are identified as "derived from the RSA Data
35  * Security, Inc. MD5 Message-Digest Algorithm" in all material
36  * mentioning or referencing the derived work.
37  *
38  * RSA Data Security, Inc. makes no representations concerning either
39  * the merchantability of this software or the suitability of this
40  * software for any particular purpose. It is provided "as is"
41  * without express or implied warranty of any kind.
42  *
43  * These notices must be retained in any copies of any part of this
44  * documentation and/or software.
45  */
46
47 #ifndef _MD5_H
48 #define _MD5_H
49
50 /* delineate the cisco changes to the RSA supplied module */
51 #define CISCO_MD5_MODS
52
53 #if defined(CISCO_MD5_MODS)
54
55 /* typedef a 32-bit type */
56 typedef unsigned long int UINT4;
57
58 /* typedef a generic pointer type */
59 typedef unsigned char *POINTER;
60
61 /* enable prototyping */
62 /* #define PROTO_LIST(x) x */
63 /* disable prototyping */
64 #define PROTO_LIST(x) ()
65
66 #endif /* defined(CISCO_MD5_MODS) */
67
68 /* MD5 context. */
69 typedef struct {
70   UINT4 state[4];                                   /* state (ABCD) */
71   UINT4 count[2];        /* number of bits, modulo 2^64 (lsb first) */
72   unsigned char buffer[64];                         /* input buffer */
73 } MD5_CTX;
74
75 void MD5Init PROTO_LIST ((MD5_CTX *));
76 void MD5Update PROTO_LIST
77   ((MD5_CTX *, unsigned char *, unsigned int));
78 void MD5Final PROTO_LIST ((unsigned char [16], MD5_CTX *));
79
80
81 #endif                          /* _MD5_H */