• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Data Structures
  • Files
  • Directories
  • File List
  • Globals

md5.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
00003  * rights reserved.
00004  * 
00005  * License to copy and use this software is granted provided that it
00006  * is identified as the "RSA Data Security, Inc. MD5 Message-Digest
00007  * Algorithm" in all material mentioning or referencing this software
00008  * or this function.
00009  * 
00010  * License is also granted to make and use derivative works provided
00011  * that such works are identified as "derived from the RSA Data
00012  * Security, Inc. MD5 Message-Digest Algorithm" in all material
00013  * mentioning or referencing the derived work.
00014  * 
00015  * RSA Data Security, Inc. makes no representations concerning either
00016  * the merchantability of this software or the suitability of this
00017  * software for any particular purpose. It is provided "as is"
00018  * without express or implied warranty of any kind.
00019  * 
00020  * These notices must be retained in any copies of any part of this
00021  * documentation and/or software.
00022  */
00023 
00031 #ifndef MD5_H
00032 #define MD5_H
00033 
00037 typedef struct {
00038   unsigned int state[4];                                   /* state (ABCD) */
00039   unsigned int count[2];        /* number of bits, modulo 2^64 (lsb first) */
00040   unsigned char buffer[64];                         /* input buffer */
00041 } MD5_CTX;
00042 
00049 void MD5Init (MD5_CTX *context);
00050 
00061 void U_MD5Update (MD5_CTX *context, unsigned char *input, unsigned int inputLen);
00062 
00071 void U_MD5Final (unsigned char digest[16], MD5_CTX *context);
00072 
00083 static inline void MD5Update (MD5_CTX *context, char *input, unsigned int inputLen)
00084 {
00085         return U_MD5Update(context, (unsigned char *)input, inputLen);
00086 }
00087 
00097 static inline void MD5Final (char digest[16], MD5_CTX *context)
00098 {
00099         U_MD5Final((unsigned char *)digest, context);
00100 }
00101 
00102 #endif /* MD5_H */

Generated on Tue May 22 2012 13:10:11 for SIP Router by  doxygen 1.7.1