Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef CUPT_HASHSUMS_SEEN
00019 #define CUPT_HASHSUMS_SEEN
00020
00022
00023 #include <cupt/common.hpp>
00024
00025 namespace cupt {
00026
00028 class CUPT_API HashSums
00029 {
00030 public:
00032 enum Type { MD5, SHA1, SHA256, Count };
00033
00035 string values[Count];
00036
00038 string& operator[](const Type& type);
00040 const string& operator[](const Type& type) const;
00042
00047 bool verify(const string& path) const;
00049
00055 bool match(const HashSums& other) const;
00057
00060 bool empty() const;
00061
00063
00066 void fill(const string& path);
00067
00069
00074 static string getHashOfString(const Type& type, const string& pattern);
00075 };
00076
00077 }
00078
00079 #endif
00080