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
00027 typedef struct MD5Context MD5_CTX;
00028
00029
00030 #ifdef __cplusplus
00031 extern "C" {
00032 #endif
00033
00040 void rpmMD5Init( struct MD5Context * ctx, int brokenEndian)
00041 ;
00042
00050 void rpmMD5Update(struct MD5Context * ctx, unsigned char const *buf,
00051 unsigned len)
00052 ;
00058
00059 void rpmMD5Final(unsigned char digest[16], struct MD5Context * ctx)
00060 ;
00061
00062
00070
00071 void rpmMD5Transform(uint32 buf[4], uint32 const in[16])
00072 ;
00073
00074
00081 int mdfile(const char * fn, unsigned char * digest)
00082 ;
00083
00090 int mdbinfile(const char * fn, unsigned char * bindigest)
00091 ;
00092
00093
00094
00095
00103 int mdfileBroken(const char * fn, unsigned char * digest)
00104 ;
00105
00113 int mdbinfileBroken(const char * fn, unsigned char * bindigest)
00114 ;
00115
00116 #ifdef __cplusplus
00117 }
00118 #endif
00119
00120 #endif