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
00024
00025 typedef struct MD5Context MD5_CTX;
00026
00027 #ifdef __cplusplus
00028 extern "C" {
00029 #endif
00030
00037 void rpmMD5Init( 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
00081
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