summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/hashes.h
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg/contrib/hashes.h')
-rw-r--r--apt-pkg/contrib/hashes.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/apt-pkg/contrib/hashes.h b/apt-pkg/contrib/hashes.h
index 14100e13b..07ccc6900 100644
--- a/apt-pkg/contrib/hashes.h
+++ b/apt-pkg/contrib/hashes.h
@@ -184,6 +184,10 @@ class Hashes
bool Add(const unsigned char * const Data, unsigned long long const Size) APT_NONNULL(2);
inline bool Add(const char * const Data) APT_NONNULL(2)
{return Add(reinterpret_cast<unsigned char const *>(Data),strlen(Data));};
+ inline bool Add(const char *const Data, unsigned long long const Size) APT_NONNULL(2)
+ {
+ return Add(reinterpret_cast<unsigned char const *>(Data), Size);
+ };
inline bool Add(const unsigned char * const Beg,const unsigned char * const End) APT_NONNULL(2,3)
{return Add(Beg,End-Beg);};
@@ -194,6 +198,9 @@ class Hashes
HashStringList GetHashStringList();
+ /** Get a specific hash. It is an error to use a hash that was not hashes */
+ HashString GetHashString(SupportedHashes hash);
+
/** create a Hashes object to calculate all supported hashes
*
* If ALL is too much, you can limit which Hashes are calculated