Main Page | Class List | File List | Class Members

md5_global.h

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

Generated on Tue Oct 25 23:04:38 2005 for fortress by  doxygen 1.4.2