diff options
author | Michael Vogt <mvo@debian.org> | 2013-11-29 13:39:45 +0100 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2013-11-29 13:39:45 +0100 |
commit | e4a93f90b2e50f6833f7146496e574a5a9cedaca (patch) | |
tree | 836dd5e70b394f9996d4af0bdfcd52d2a388a007 /apt-pkg/contrib/hashes.h | |
parent | fdef7c5e3a19c5f35ee952598124d0fe8d03c7ec (diff) | |
parent | faeb435cab7b41a50c621ef9f96853d15c57d0d8 (diff) |
Merge remote-tracking branch 'mvo/debian/sid' into debian/sid
Conflicts:
apt-private/private-cmndline.cc
Diffstat (limited to 'apt-pkg/contrib/hashes.h')
-rw-r--r-- | apt-pkg/contrib/hashes.h | 9 |
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; |