aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/hash.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/hash.hh')
-rw-r--r--src/libutil/hash.hh7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libutil/hash.hh b/src/libutil/hash.hh
index 00ce7bb6f..1b626dd85 100644
--- a/src/libutil/hash.hh
+++ b/src/libutil/hash.hh
@@ -59,9 +59,6 @@ private:
Hash(std::string_view s, HashType type, bool isSRI);
public:
- /* Check whether a hash is set. */
- operator bool () const { return (bool) type; }
-
/* Check whether two hash are equal. */
bool operator == (const Hash & h2) const;
@@ -105,6 +102,8 @@ public:
assert(type == htSHA1);
return std::string(to_string(Base16, false), 0, 7);
}
+
+ static Hash dummy;
};
/* Helper that defaults empty hashes to the 0 hash. */
@@ -157,7 +156,7 @@ public:
HashSink(HashType ht);
HashSink(const HashSink & h);
~HashSink();
- void write(const unsigned char * data, size_t len) override;
+ void write(std::string_view data) override;
HashResult finish() override;
HashResult currentHash();
};