summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/hashes.h
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2011-02-25 13:47:09 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2011-02-25 13:47:09 +0100
commitd9b9e9e2495fa4cfd9f555cd51a394bad2f98894 (patch)
tree99b415b32f88e35e3aae398d5ad1890f861a1097 /apt-pkg/contrib/hashes.h
parent54ce88fd2669a729c89c940be3abc9456d19d542 (diff)
parent9a961efc5cedeb2b7439114df18e8d0201c83fcf (diff)
add sha512 support in the client now as well
Diffstat (limited to 'apt-pkg/contrib/hashes.h')
-rw-r--r--apt-pkg/contrib/hashes.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/apt-pkg/contrib/hashes.h b/apt-pkg/contrib/hashes.h
index 264f7fe90..b3587e02a 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/sha256.h>
+#include <apt-pkg/sha512.h>
#include <algorithm>
#include <vector>
@@ -60,10 +61,11 @@ class Hashes
MD5Summation MD5;
SHA1Summation SHA1;
SHA256Summation SHA256;
+ SHA512Summation SHA512;
inline bool Add(const unsigned char *Data,unsigned long Size)
{
- return MD5.Add(Data,Size) && SHA1.Add(Data,Size) && SHA256.Add(Data,Size);
+ 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);