37 lines
741 B
C++
37 lines
741 B
C++
#ifndef MD5_WRAPPER_HPP
|
|
#define MD5_WRAPPER_HPP
|
|
|
|
#include <string>
|
|
|
|
class MD5_wrapper
|
|
{
|
|
public:
|
|
MD5_wrapper(unsigned char*);
|
|
MD5_wrapper(const char*);
|
|
MD5_wrapper(const std::string&);
|
|
inline const std::string& GetString() const;
|
|
|
|
inline bool operator==(const MD5_wrapper&) const;
|
|
inline bool operator!=(const MD5_wrapper&) const;
|
|
private:
|
|
unsigned long GetSizeByFD(const int) const;
|
|
std::string _md5;
|
|
};
|
|
|
|
inline const std::string &MD5_wrapper::GetString() const
|
|
{
|
|
return _md5;
|
|
}
|
|
|
|
inline bool MD5_wrapper::operator==(const MD5_wrapper &rhs) const
|
|
{
|
|
return this->GetString() == rhs.GetString();
|
|
}
|
|
|
|
inline bool MD5_wrapper::operator!=(const MD5_wrapper &rhs) const
|
|
{
|
|
return this->GetString() != rhs.GetString();
|
|
}
|
|
|
|
#endif
|