Main Page   Modules   Compound List   File List   Compound Members   File Members   Related Pages  

lib/md5.h

Go to the documentation of this file.
00001 #ifndef MD5_H
00002 #define MD5_H
00003 
00008 #include <sys/types.h>
00009 
00010 typedef unsigned int uint32;
00011 
00015 struct MD5Context {
00016         uint32 buf[4];
00017         uint32 bits[2];
00018         unsigned char in[64];
00019         int doByteReverse;
00020 };
00021 
00022 /*
00023  * This is needed to make RSAREF happy on some MS-DOS compilers.
00024  */
00025 typedef /*@abstract@*/ struct MD5Context MD5_CTX;
00026 
00027 #ifdef __cplusplus
00028 extern "C" {
00029 #endif
00030 
00037 void rpmMD5Init( /*@out@*/ struct MD5Context *context, int brokenEndian);
00038 
00046 void rpmMD5Update(struct MD5Context *context, unsigned char const *buf,
00047                unsigned len);
00053 void rpmMD5Final(unsigned char digest[16], struct MD5Context *context);
00054 
00062 void rpmMD5Transform(uint32 buf[4], uint32 const in[16]);
00063 
00070 int mdfile(const char *fn, unsigned char *digest);
00071 
00078 int mdbinfile(const char *fn, unsigned char *bindigest);
00079 
00080 /* These assume a little endian machine and return incorrect results!
00081    They are here for compatibility with old (broken) versions of RPM */
00082 
00090 int mdfileBroken(const char *fn, unsigned char *digest);
00091 
00099 int mdbinfileBroken(const char *fn, unsigned char *bindigest);
00100 
00101 #ifdef __cplusplus
00102 }
00103 #endif
00104 
00105 #endif  /* MD5_H */

Generated at Mon May 21 08:53:39 2001 for rpm by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001