Back to home page

MITgcm

 
 

    


File indexing completed on 2018-03-02 18:44:58 UTC

view on githubraw file Latest commit e768bd12 on 2008-02-26 17:05:00 UTC
ec6cf3b09d Ed H*0001 /* MD5.H - header file for MD5C.C
                0002  */
                0003 
                0004 /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
                0005 rights reserved.
                0006 
                0007 License to copy and use this software is granted provided that it
                0008 is identified as the "RSA Data Security, Inc. MD5 Message-Digest
                0009 Algorithm" in all material mentioning or referencing this software
                0010 or this function.
                0011 
                0012 License is also granted to make and use derivative works provided
                0013 that such works are identified as "derived from the RSA Data
                0014 Security, Inc. MD5 Message-Digest Algorithm" in all material
                0015 mentioning or referencing the derived work.
                0016 
                0017 RSA Data Security, Inc. makes no representations concerning either
                0018 the merchantability of this software or the suitability of this
                0019 software for any particular purpose. It is provided "as is"
                0020 without express or implied warranty of any kind.
                0021 These notices must be retained in any copies of any part of this
                0022 documentation and/or software.
                0023  */
                0024 
                0025 /* GLOBAL.H - RSAREF types and constants
                0026  */
                0027 
                0028 /* PROTOTYPES should be set to one if and only if the compiler supports
                0029   function argument prototyping.
                0030 The following makes PROTOTYPES default to 0 if it has not already
                0031   been defined with C compiler flags.
                0032  */
                0033 #ifndef PROTOTYPES
                0034 #define PROTOTYPES 0
                0035 #endif
                0036 
e768bd1221 Jean*0037 #include <stdint.h>
                0038 
ec6cf3b09d Ed H*0039 /* POINTER defines a generic pointer type */
                0040 typedef unsigned char *POINTER;
                0041 
                0042 /* UINT2 defines a two byte word */
e768bd1221 Jean*0043 typedef uint16_t UINT2;
ec6cf3b09d Ed H*0044 
                0045 /* UINT4 defines a four byte word */
e768bd1221 Jean*0046 typedef uint32_t UINT4;
ec6cf3b09d Ed H*0047 
                0048 /* PROTO_LIST is defined depending on how PROTOTYPES is defined above.
                0049 If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it
                0050   returns an empty list.
                0051  */
                0052 #if PROTOTYPES
                0053 #define PROTO_LIST(list) list
                0054 #else
                0055 #define PROTO_LIST(list) ()
                0056 #endif
                0057 
                0058 /* MD5 context. */
                0059 typedef struct {
                0060   UINT4 state[4];                                   /* state (ABCD) */
                0061   UINT4 count[2];        /* number of bits, modulo 2^64 (lsb first) */
                0062   unsigned char buffer[64];                         /* input buffer */
                0063 } MD5_CTX;
                0064 
                0065 void MD5Init PROTO_LIST ((MD5_CTX *));
                0066 void MD5Update PROTO_LIST
                0067   ((MD5_CTX *, unsigned char *, unsigned int));
                0068 void MD5Final PROTO_LIST ((unsigned char [16], MD5_CTX *));
                0069