summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/hashes.h
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2013-11-29 14:39:27 +0100
committerMichael Vogt <mvo@debian.org>2013-11-29 14:39:27 +0100
commite2264d3f957694e229a9f6976fc136b8f82ad770 (patch)
treec1f0b9c64d1d60defe5ce1a89c6bc136d758a772 /apt-pkg/contrib/hashes.h
parentfd4e73c33c20873af670ee40b549c46ee0d50801 (diff)
parentc9a5f74bd57fa4fcf4e30cade8e48c5635448689 (diff)
Merge branch 'debian/sid' into ubuntu/master
Conflicts: debian/changelog
Diffstat (limited to 'apt-pkg/contrib/hashes.h')
-rw-r--r--apt-pkg/contrib/hashes.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/apt-pkg/contrib/hashes.h b/apt-pkg/contrib/hashes.h
index 0c0b6c6a7..0a8bcd259 100644
--- a/apt-pkg/contrib/hashes.h
+++ b/apt-pkg/contrib/hashes.h
@@ -36,7 +36,10 @@ class HashString
protected:
std::string Type;
std::string Hash;
- static const char * _SupportedHashes[10];
+ static const char* _SupportedHashes[10];
+
+ // internal helper
+ std::string GetHashForFile(std::string filename) const;
public:
HashString(std::string Type, std::string Hash);
@@ -49,6 +52,10 @@ class HashString
// verify the given filename against the currently loaded hash
bool VerifyFile(std::string filename) const;
+ // generate a hash string from the given filename
+ bool FromFile(std::string filename);
+
+
// helper
std::string toStr() const; // convert to str as "type:hash"
bool empty() const;