|
libosip 3.6.0
|
00001 /* MD5.H - header file for MD5C.C 00002 */ 00003 00004 /* Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All 00005 rights reserved. 00006 00007 License to copy and use this software is granted provided that it 00008 is identified as the "RSA Data Security, Inc. MD5 Message-Digest 00009 Algorithm" in all material mentioning or referencing this software 00010 or this function. 00011 00012 License is also granted to make and use derivative works provided 00013 that such works are identified as "derived from the RSA Data 00014 Security, Inc. MD5 Message-Digest Algorithm" in all material 00015 mentioning or referencing the derived work. 00016 00017 RSA Data Security, Inc. makes no representations concerning either 00018 the merchantability of this software or the suitability of this 00019 software for any particular purpose. It is provided "as is" 00020 without express or implied warranty of any kind. 00021 00022 These notices must be retained in any copies of any part of this 00023 documentation and/or software. 00024 */ 00025 00026 #ifndef _MD5_H_ 00027 #define _MD5_H_ 00028 00029 #ifndef DOXYGEN 00030 00031 00032 #ifdef __cplusplus 00033 extern "C" { 00034 #endif 00035 00036 /* modified for oSIP: GCC supports this feature */ 00037 #define PROTOTYPES 1 00038 00039 #ifndef PROTOTYPES 00040 #define PROTOTYPES 0 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 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 00067 typedef struct { 00068 UINT4 state[4]; /* state (ABCD) */ 00069 UINT4 count[2]; /* number of bits, modulo 2^64 (lsb first) */ 00070 unsigned char buffer[64]; /* input buffer */ 00071 } osip_MD5_CTX; 00072 00073 void osip_MD5Init PROTO_LIST((osip_MD5_CTX *)); 00074 void osip_MD5Update 00075 PROTO_LIST((osip_MD5_CTX *, unsigned char *, unsigned int)); 00076 void osip_MD5Final PROTO_LIST((unsigned char[16], osip_MD5_CTX *)); 00077 00078 00079 #ifdef __cplusplus 00080 } 00081 #endif 00082 #endif 00083 #endif
1.7.3