OSDN Git Service

2013.10.24
[uclinux-h8/uClinux-dist.git] / freeswan / klips / net / ipsec / ipsec_md5h.h
1 /*
2  * RCSID $Id: ipsec_md5h.h,v 1.6 1999/12/13 13:59:13 rgb Exp $
3  */
4
5 /*
6  * The rest of this file is Copyright RSA DSI. See the following comments
7  * for the full Copyright notice.
8  */
9
10 #ifndef _IPSEC_MD5H_H_
11 #define _IPSEC_MD5H_H_
12
13 /* GLOBAL.H - RSAREF types and constants
14  */
15
16 /* PROTOTYPES should be set to one if and only if the compiler supports
17      function argument prototyping.
18    The following makes PROTOTYPES default to 0 if it has not already
19      been defined with C compiler flags.
20  */
21 #ifndef PROTOTYPES
22 #define PROTOTYPES 1
23 #endif /* !PROTOTYPES */
24
25 /* POINTER defines a generic pointer type */
26 typedef __u8 *POINTER;
27
28 /* UINT2 defines a two byte word */
29 typedef __u16 UINT2;
30
31 /* UINT4 defines a four byte word */
32 typedef __u32 UINT4;
33
34 /* PROTO_LIST is defined depending on how PROTOTYPES is defined above.
35    If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it
36      returns an empty list.
37  */
38
39 #if PROTOTYPES
40 #define PROTO_LIST(list) list
41 #else /* PROTOTYPES */
42 #define PROTO_LIST(list) ()
43 #endif /* PROTOTYPES */
44
45
46 /* MD5.H - header file for MD5C.C
47  */
48
49 /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
50 rights reserved.
51
52 License to copy and use this software is granted provided that it
53 is identified as the "RSA Data Security, Inc. MD5 Message-Digest
54 Algorithm" in all material mentioning or referencing this software
55 or this function.
56
57 License is also granted to make and use derivative works provided
58 that such works are identified as "derived from the RSA Data
59 Security, Inc. MD5 Message-Digest Algorithm" in all material
60 mentioning or referencing the derived work.
61
62 RSA Data Security, Inc. makes no representations concerning either
63 the merchantability of this software or the suitability of this
64 software for any particular purpose. It is provided "as is"
65 without express or implied warranty of any kind.
66
67 These notices must be retained in any copies of any part of this
68 documentation and/or software.
69  */
70
71 /* MD5 context. */
72 typedef struct {
73   UINT4 state[4];                                   /* state (ABCD) */
74   UINT4 count[2];        /* number of bits, modulo 2^64 (lsb first) */
75   unsigned char buffer[64];                         /* input buffer */
76 } MD5_CTX;
77
78 void MD5Init PROTO_LIST ((MD5_CTX *));
79 void MD5Update PROTO_LIST
80   ((MD5_CTX *, unsigned char *, __u32));
81 void MD5Final PROTO_LIST ((unsigned char [16], MD5_CTX *));
82  
83 #endif /* _IPSEC_MD5H_H_ */
84
85 /*
86  * $Log: ipsec_md5h.h,v $
87  * Revision 1.6  1999/12/13 13:59:13  rgb
88  * Quick fix to argument size to Update bugs.
89  *
90  * Revision 1.5  1999/12/07 18:16:23  rgb
91  * Fixed comments at end of #endif lines.
92  *
93  * Revision 1.4  1999/04/06 04:54:26  rgb
94  * Fix/Add RCSID Id: and Log: bits to make PHMDs happy.  This includes
95  * patch shell fixes.
96  *
97  * Revision 1.3  1999/01/22 06:19:58  rgb
98  * 64-bit clean-up.
99  *
100  * Revision 1.2  1998/11/30 13:22:54  rgb
101  * Rationalised all the klips kernel file headers.  They are much shorter
102  * now and won't conflict under RH5.2.
103  *
104  * Revision 1.1  1998/06/18 21:27:48  henry
105  * move sources from klips/src to klips/net/ipsec, to keep stupid
106  * kernel-build scripts happier in the presence of symlinks
107  *
108  * Revision 1.2  1998/04/23 20:54:03  rgb
109  * Fixed md5 and sha1 include file nesting issues, to be cleaned up when
110  * verified.
111  *
112  * Revision 1.1  1998/04/09 03:04:21  henry
113  * sources moved up from linux/net/ipsec
114  * these two include files modified not to include others except in kernel
115  *
116  * Revision 1.1.1.1  1998/04/08 05:35:03  henry
117  * RGB's ipsec-0.8pre2.tar.gz ipsec-0.8
118  *
119  * Revision 0.4  1997/01/15 01:28:15  ji
120  * No changes.
121  *
122  * Revision 0.3  1996/11/20 14:48:53  ji
123  * Release update only.
124  *
125  * Revision 0.2  1996/11/02 00:18:33  ji
126  * First limited release.
127  *
128  *
129  */