OSDN Git Service

Add MS7619SE
[uclinux-h8/uClinux-dist.git] / openswan / include / 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 typedef const unsigned char *CONST_POINTER;
18
19 /* UINT2 defines a two byte word */
20 typedef unsigned short int UINT2;
21
22 /* UINT4 defines a four byte word */
23 typedef unsigned long int UINT4;
24
25 /* PROTO_LIST is defined depending on how PROTOTYPES is defined above.
26    If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it
27      returns an empty list.
28  */
29
30 #if PROTOTYPES
31 #define PROTO_LIST(list) list
32 #else
33 #define PROTO_LIST(list) ()
34 #endif
35
36 #endif
37
38 /* MD2.H - header file for MD2C.C
39  */
40
41 /* Copyright (C) 1990-2, RSA Data Security, Inc. Created 1990. All
42    rights reserved.
43
44    License to copy and use this software is granted for
45    non-commercial Internet Privacy-Enhanced Mail provided that it is
46    identified as the "RSA Data Security, Inc. MD2 Message Digest
47    Algorithm" in all material mentioning or referencing this software
48    or this function.
49
50    RSA Data Security, Inc. makes no representations concerning either
51    the merchantability of this software or the suitability of this
52    software for any particular purpose. It is provided "as is"
53    without express or implied warranty of any kind.
54
55    These notices must be retained in any copies of any part of this
56    documentation and/or software.
57  */
58
59 /* MD2 context. */
60 typedef struct {
61   unsigned char state[16];                                 /* state */
62   unsigned char checksum[16];                           /* checksum */
63   unsigned int count;                 /* number of bytes, modulo 16 */
64   unsigned char buffer[16];                         /* input buffer */
65 } MD2_CTX;
66
67 void MD2Init PROTO_LIST ((MD2_CTX *));
68 void MD2Update PROTO_LIST
69   ((MD2_CTX *, const unsigned char *, unsigned int));
70 void MD2Final PROTO_LIST ((unsigned char [16], MD2_CTX *));
71
72 #define _MD2_H_