X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/cf4ff3b78dc347188949370db914fe6329be6c99..3b5607fc31371190470074371793cb8500b5139e:/apt-pkg/contrib/hashes.h?ds=sidebyside diff --git a/apt-pkg/contrib/hashes.h b/apt-pkg/contrib/hashes.h index 636cad257..7a62f8a8f 100644 --- a/apt-pkg/contrib/hashes.h +++ b/apt-pkg/contrib/hashes.h @@ -17,17 +17,22 @@ #include #include #include -#include -#include -#include #include - +#include #ifndef APT_8_CLEANER_HEADERS using std::min; using std::vector; #endif +#ifndef APT_10_CLEANER_HEADERS +#include +#include +#include +#endif + + +class FileFd; // helper class that contains hash function name // and hash @@ -61,7 +66,7 @@ class HashString bool empty() const; // return the list of hashes we support - static const char** SupportedHashes(); + static APT_CONST const char** SupportedHashes(); }; class Hashes @@ -73,6 +78,8 @@ class Hashes SHA256Summation SHA256; SHA512Summation SHA512; + static const int UntilEOF = 0; + inline bool Add(const unsigned char *Data,unsigned long long Size) { return MD5.Add(Data,Size) && SHA1.Add(Data,Size) && SHA256.Add(Data,Size) && SHA512.Add(Data,Size);