ARPDAS_QNX6 1.0
|
00001 /* MD5.H - header file for MD5C.C 00002 Obtained from RFC 1321 Reference Implementation 00003 */ 00004 #ifndef MD5_H 00005 #define MD5_H 00006 00007 /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All 00008 rights reserved. 00009 00010 License to copy and use this software is granted provided that it 00011 is identified as the "RSA Data Security, Inc. MD5 Message-Digest 00012 Algorithm" in all material mentioning or referencing this software 00013 or this function. 00014 00015 License is also granted to make and use derivative works provided 00016 that such works are identified as "derived from the RSA Data 00017 Security, Inc. MD5 Message-Digest Algorithm" in all material 00018 mentioning or referencing the derived work. 00019 00020 RSA Data Security, Inc. makes no representations concerning either 00021 the merchantability of this software or the suitability of this 00022 software for any particular purpose. It is provided "as is" 00023 without express or implied warranty of any kind. 00024 These notices must be retained in any copies of any part of this 00025 documentation and/or software. 00026 */ 00027 00028 #ifndef GLOBAL_H 00029 #define GLOBAL_H 00030 /* GLOBAL.H - RSAREF types and constants 00031 */ 00032 00033 /* PROTOTYPES should be set to one if and only if the compiler supports 00034 function argument prototyping. 00035 The following makes PROTOTYPES default to 0 if it has not already 00036 been defined with C compiler flags. 00037 */ 00038 #ifndef PROTOTYPES 00039 #define PROTOTYPES 1 00040 #endif 00041 00042 /* POINTER defines a generic pointer type */ 00043 typedef unsigned char *POINTER; 00044 00045 /* UINT2 defines a two byte word */ 00046 typedef unsigned short int UINT2; 00047 00048 /* UINT4 defines a four byte word */ 00049 typedef unsigned long int UINT4; 00050 00051 /* PROTO_LIST is defined depending on how PROTOTYPES is defined above. 00052 If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it 00053 returns an empty list. 00054 */ 00055 #if PROTOTYPES 00056 #define PROTO_LIST(list) list 00057 #else 00058 #define PROTO_LIST(list) () 00059 #endif 00060 00061 #endif /* GLOBAL_H */ 00062 00063 /* MD5 context. */ 00064 typedef struct { 00065 UINT4 state[4]; /* state (ABCD) */ 00066 UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */ 00067 unsigned char buffer[64]; /* input buffer */ 00068 } MD5_CTX; 00069 00070 #ifdef __cplusplus 00071 extern "C" { 00072 #endif 00073 00074 void MD5Init PROTO_LIST ((MD5_CTX *)); 00075 void MD5Update PROTO_LIST ((MD5_CTX *, unsigned char *, unsigned int)); 00076 void MD5Final PROTO_LIST ((unsigned char [16], MD5_CTX *)); 00077 00078 #ifdef __cplusplus 00079 }; 00080 #endif 00081 00082 #endif /* MD5_H */