Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

md5.h

Go to the documentation of this file.
00001 /*
00002  * This is the header file for the MD5 message-digest algorithm.
00003  * The algorithm is due to Ron Rivest.  This code was
00004  * written by Colin Plumb in 1993, no copyright is claimed.
00005  * This code is in the public domain; do with it what you wish.
00006  *
00007  * Equivalent code is available from RSA Data Security, Inc.
00008  * This code has been tested against that, and is equivalent,
00009  * except that you don't need to include two pages of legalese
00010  * with every copy.
00011  *
00012  * To compute the message digest of a chunk of bytes, declare an
00013  * MD5Context structure, pass it to MD5Init, call MD5Update as
00014  * needed on buffers full of bytes, and then call MD5Final, which
00015  * will fill a supplied 16-byte array with the digest.
00016  *
00017  * Changed so as no longer to depend on Colin Plumb's `usual.h'
00018  * header definitions; now uses stuff from dpkg's config.h
00019  *  - Ian Jackson <ijackson@nyx.cs.du.edu>.
00020  * Still in the public domain.
00021  *
00022  * md5_buffer added by Steven Fuller
00023  * Still in the public domain.
00024  */
00025 
00026 #ifndef MD5_H
00027 #define MD5_H
00028 
00029 #ifdef __cplusplus
00030 extern "C" {
00031 #endif
00032 
00033 typedef unsigned int UWORD32;
00034 
00035 #define md5byte unsigned char
00036 
00037 struct MD5Context {
00038         UWORD32 buf[4];
00039         UWORD32 bytes[2];
00040         UWORD32 in[16];
00041 };
00042 
00043 void MD5Init(struct MD5Context *context);
00044 void MD5Update(struct MD5Context *context, md5byte const *buf, unsigned len);
00045 void MD5Final(unsigned char digest[16], struct MD5Context *context);
00046 void MD5Transform(UWORD32 buf[4], UWORD32 const in[16]);
00047 
00048 /* md5_buffer frontend added for AvP */
00049 void md5_buffer(char const *buffer, unsigned int len, char *digest);
00050 
00051 #ifdef __cplusplus
00052 };
00053 #endif
00054 
00055 #endif /* !MD5_H */

Generated on Sat Nov 5 16:18:08 2005 for OPIE by  doxygen 1.4.2