diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2011-07-13 23:10:38 +0200 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2011-07-13 23:10:38 +0200 |
commit | 1dab797ca6dc0357474675a0f132c962dee4a2c2 (patch) | |
tree | f2b6a5fbef520da33a48b9f769511e0c85082c04 /apt-pkg/contrib/hashes.h | |
parent | 96c9fb174df24fadcde516f26f89d1a64f42eea7 (diff) |
enable Hashes::AddFD() to skip creation of certain hashes
Diffstat (limited to 'apt-pkg/contrib/hashes.h')
-rw-r--r-- | apt-pkg/contrib/hashes.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apt-pkg/contrib/hashes.h b/apt-pkg/contrib/hashes.h index 4b6a08b1f..e702fcca2 100644 --- a/apt-pkg/contrib/hashes.h +++ b/apt-pkg/contrib/hashes.h @@ -67,7 +67,10 @@ class Hashes return MD5.Add(Data,Size) && SHA1.Add(Data,Size) && SHA256.Add(Data,Size) && SHA512.Add(Data,Size); }; inline bool Add(const char *Data) {return Add((unsigned char *)Data,strlen(Data));}; - bool AddFD(int Fd,unsigned long Size); + inline bool AddFD(int const Fd,unsigned long Size = 0) + { return AddFD(Fd, Size, true, true, true, true); }; + bool AddFD(int const Fd, unsigned long Size, bool const addMD5, + bool const addSHA1, bool const addSHA256, bool const addSHA512); inline bool Add(const unsigned char *Beg,const unsigned char *End) {return Add(Beg,End-Beg);}; }; |