/* */ #ifndef D_CHECKSUM_H #define D_CHECKSUM_H #include "common.h" #include namespace aria2 { class Checksum { private: std::string hashType_; std::string digest_; public: // digest_ is raw byte array of hash value, not ascii hexadecimal notation. Checksum(const std::string& hashType, const std::string& digest); Checksum(); ~Checksum(); bool isEmpty() const; void setDigest(const std::string& md); const std::string& getDigest() const { return digest_; } void setHashType(const std::string& type); const std::string& getHashType() const { return hashType_; } void swap(Checksum& other); }; void swap(Checksum& a, Checksum& b); class HashTypeStronger { public: bool operator()(const Checksum& lhs, const Checksum& rhs) const; }; } // namespace aria2 #endif // D_CHECKSUM_H