Back to index

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