00001
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049 #ifndef INC_MI32_MD5HASH_H
00050 #define INC_MI32_MD5HASH_H
00051
00052 #ifndef GENERATING_DOXYGEN_OUTPUT
00053 struct MD5_CTX;
00054 class STRUTF8;
00055 #endif // GENERATING_DOXYGEN_OUTPUT
00056
00057 #ifndef INC_MI32_MISTRING_H
00058 #include <mi32/mistring.h>
00059 #endif
00060
00061 #ifdef MISYSTEMDLL
00062 #define CLASSLIBEXPORT MI_DLLCLASSEXPORT
00063 #else
00064 #define CLASSLIBEXPORT MI_DLLCLASSIMPORT
00065 #endif
00066
00067 class CLASSLIBEXPORT MD5HASH {
00068 public:
00069
00071 MD5HASH (
00072 );
00073
00075 ~MD5HASH (
00076 );
00077
00080 void Append (
00081 const STRUTF8& buffer
00082 );
00083
00087 void Append (
00088 const MISTRING& string
00089 );
00090
00093 void Append (
00094 const UINT8* buffer,
00095 INT32 BufferSize
00096 );
00097
00099 void Clear (
00100 );
00101
00105 void Finish (
00106 unsigned char digest[16]
00107 );
00108
00113 MISTRING Finish (
00114 );
00115
00118 static MISTRING GenerateHash (
00119 const STRUTF8& buffer
00120 );
00121
00125 static MISTRING GenerateHash (
00126 const MISTRING& string
00127 );
00128
00129 private:
00130 #ifndef GENERATING_DOXYGEN_OUTPUT
00131 MD5_CTX* m_context;
00132
00133 MD5HASH (const MD5HASH& rhs);
00134 MD5HASH& operator= (const MD5HASH& rhs);
00135 #endif // GENERATING_DOXYGEN_OUTPUT
00136 };
00137
00138 #undef CLASSLIBEXPORT
00139 #endif