diff options
Diffstat (limited to 'src/libutil/hash.hh')
-rw-r--r-- | src/libutil/hash.hh | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/libutil/hash.hh b/src/libutil/hash.hh index edede8ace..ea9fca3e7 100644 --- a/src/libutil/hash.hh +++ b/src/libutil/hash.hh @@ -123,7 +123,12 @@ string printHashType(HashType ht); union Ctx; -class HashSink : public BufferedSink +struct AbstractHashSink : virtual Sink +{ + virtual HashResult finish() = 0; +}; + +class HashSink : public BufferedSink, public AbstractHashSink { private: HashType ht; @@ -134,8 +139,8 @@ public: HashSink(HashType ht); HashSink(const HashSink & h); ~HashSink(); - void write(const unsigned char * data, size_t len); - HashResult finish(); + void write(const unsigned char * data, size_t len) override; + HashResult finish() override; HashResult currentHash(); }; |