26 typedef unsigned int size_type;
29 MD5(
const std::string& text);
30 void update(
const unsigned char *buf, size_type length);
31 void update(
const char *buf, size_type length);
33 std::string hexdigest()
const;
34 friend std::ostream& operator<<(std::ostream&,
MD5 md5);
38 typedef unsigned char uint1;
39 typedef unsigned int uint4;
40 enum {blocksize = 64};
42 void transform(
const uint1 block[blocksize]);
43 static void decode(uint4 output[],
const uint1 input[], size_type len);
44 static void encode(uint1 output[],
const uint4 input[], size_type len);
47 uint1 buffer[blocksize];
53 static inline uint4 F(uint4 x, uint4 y, uint4 z);
54 static inline uint4 G(uint4 x, uint4 y, uint4 z);
55 static inline uint4 H(uint4 x, uint4 y, uint4 z);
56 static inline uint4 I(uint4 x, uint4 y, uint4 z);
57 static inline uint4 rotate_left(uint4 x,
int n);
58 static inline void FF(uint4 &a, uint4 b, uint4 c, uint4 d, uint4 x, uint4 s, uint4 ac);
59 static inline void GG(uint4 &a, uint4 b, uint4 c, uint4 d, uint4 x, uint4 s, uint4 ac);
60 static inline void HH(uint4 &a, uint4 b, uint4 c, uint4 d, uint4 x, uint4 s, uint4 ac);
61 static inline void II(uint4 &a, uint4 b, uint4 c, uint4 d, uint4 x, uint4 s, uint4 ac);
64 std::string md5(
const std::string str);