00001 #ifndef MD5_H
00002 #define MD5_H
00003
00009 #include <sys/types.h>
00010
00011 typedef unsigned int uint32;
00012
00016 struct MD5Context {
00017 uint32 buf[4];
00018 uint32 bits[2];
00019 unsigned char in[64];
00020 int doByteReverse;
00021 };
00022
00023
00024
00025
00026 typedef struct MD5Context MD5_CTX;
00027
00028 #ifdef __cplusplus
00029 extern "C" {
00030 #endif
00031
00038 void rpmMD5Init( struct MD5Context *context, int brokenEndian);
00039
00047 void rpmMD5Update(struct MD5Context *context, unsigned char const *buf,
00048 unsigned len);
00054 void rpmMD5Final(unsigned char digest[16], struct MD5Context *context);
00055
00063 void rpmMD5Transform(uint32 buf[4], uint32 const in[16]);
00064
00071 int mdfile(const char *fn, unsigned char *digest);
00072
00079 int mdbinfile(const char *fn, unsigned char *bindigest);
00080
00081
00082
00083
00091 int mdfileBroken(const char *fn, unsigned char *digest);
00092
00100 int mdbinfileBroken(const char *fn, unsigned char *bindigest);
00101
00102 #ifdef __cplusplus
00103 }
00104 #endif
00105
00106 #endif