OSDN Git Service

2013.10.24
[uclinux-h8/uClinux-dist.git] / freeswan / pluto / md2.h
1 #ifndef _GLOBAL_H_
2 #define _GLOBAL_H_
3 /* GLOBAL.H - RSAREF types and constants
4  */
5
6 /* PROTOTYPES should be set to one if and only if the compiler supports
7      function argument prototyping.
8    The following makes PROTOTYPES default to 0 if it has not already
9      been defined with C compiler flags.
10  */
11 #ifndef PROTOTYPES
12 #define PROTOTYPES 1
13 #endif
14
15 /* POINTER defines a generic pointer type */
16 typedef unsigned char *POINTER;
17
18 /* UINT2 defines a two byte word */
19 typedef unsigned short int UINT2;
20
21 /* UINT4 defines a four byte word */
22 typedef unsigned long int UINT4;
23
24 /* PROTO_LIST is defined depending on how PROTOTYPES is defined above.
25    If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it
26      returns an empty list.
27  */
28
29 #if PROTOTYPES
30 #define PROTO_LIST(list) list
31 #else
32 #define PROTO_LIST(list) ()
33 #endif
34
35 #endif
36
37 /* MD2.H - header file for MD2C.C
38  */
39
40 /* Copyright (C) 1990-2, RSA Data Security, Inc. Created 1990. All
41    rights reserved.
42
43    License to copy and use this software is granted for
44    non-commercial Internet Privacy-Enhanced Mail provided that it is
45    identified as the "RSA Data Security, Inc. MD2 Message Digest
46    Algorithm" in all material mentioning or referencing this software
47    or this function.
48
49    RSA Data Security, Inc. makes no representations concerning either
50    the merchantability of this software or the suitability of this
51    software for any particular purpose. It is provided "as is"
52    without express or implied warranty of any kind.
53
54    These notices must be retained in any copies of any part of this
55    documentation and/or software.
56  */
57
58 /* MD2 context. */
59 typedef struct {
60   unsigned char state[16];                                 /* state */
61   unsigned char checksum[16];                           /* checksum */
62   unsigned int count;                 /* number of bytes, modulo 16 */
63   unsigned char buffer[16];                         /* input buffer */
64 } MD2_CTX;
65
66 void MD2Init PROTO_LIST ((MD2_CTX *));
67 void MD2Update PROTO_LIST
68   ((MD2_CTX *, unsigned char *, unsigned int));
69 void MD2Final PROTO_LIST ((unsigned char [16], MD2_CTX *));
70
71 #define _MD2_H_