00001 #ifndef MMANN_MD5HASH_H 00002 #define MMANN_MD5HASH_H 00003 00011 00013 #define MD5_HASHBYTES 16 00014 00019 class MD5Hash 00020 { 00021 public: 00023 MD5Hash(); 00024 00026 ~MD5Hash(); 00027 00030 void Init(); 00031 00037 void Update(unsigned char const *Buffer, unsigned Length); 00038 00043 void Final(unsigned char Digest[MD5_HASHBYTES]); 00044 00045 protected: 00046 00050 void Transform(unsigned __int32 buf[4], unsigned __int32 const in[16]); 00051 00052 private: 00054 unsigned __int32 m_Buffer[4]; 00055 00057 unsigned __int32 m_Bits[2]; 00058 00060 unsigned char m_In[64]; 00061 }; 00062 00063 #endif