summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/hashes.h
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2012-01-05 20:20:24 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2012-01-05 20:20:24 +0100
commit570590c0640f71c98893051420517894be8eb6eb (patch)
tree563eeacf3aa349c1c7366c073cfb99348ab1c6a8 /apt-pkg/contrib/hashes.h
parentb7c7eb099c8d228935f9c3fa0a7c788a4018bfb1 (diff)
parent5c6ceb4557cb6497dea827d1ec4e2615ccd53e50 (diff)
merged from debian-experimental2
Diffstat (limited to 'apt-pkg/contrib/hashes.h')
-rw-r--r--apt-pkg/contrib/hashes.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/apt-pkg/contrib/hashes.h b/apt-pkg/contrib/hashes.h
index b206eccb8..0c0b6c6a7 100644
--- a/apt-pkg/contrib/hashes.h
+++ b/apt-pkg/contrib/hashes.h
@@ -17,6 +17,7 @@
#include <apt-pkg/md5.h>
#include <apt-pkg/sha1.h>
#include <apt-pkg/sha2.h>
+#include <apt-pkg/fileutl.h>
#include <algorithm>
#include <vector>
@@ -74,6 +75,10 @@ class Hashes
{ return AddFD(Fd, Size, true, true, true, true); };
bool AddFD(int const Fd, unsigned long long Size, bool const addMD5,
bool const addSHA1, bool const addSHA256, bool const addSHA512);
+ inline bool AddFD(FileFd &Fd,unsigned long long Size = 0)
+ { return AddFD(Fd, Size, true, true, true, true); };
+ bool AddFD(FileFd &Fd, unsigned long 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);};
};