diff options
Diffstat (limited to 'libbutl/sha1.mxx')
-rw-r--r-- | libbutl/sha1.mxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libbutl/sha1.mxx b/libbutl/sha1.mxx index 26d4b59..f69ae5a 100644 --- a/libbutl/sha1.mxx +++ b/libbutl/sha1.mxx @@ -74,6 +74,11 @@ LIBBUTL_MODEXPORT namespace butl explicit sha1 (ifdstream& i): sha1 () {append (i);} + // Check if any data has been hashed. + // + bool + empty () const {return empty_;} + // Extract result. // // It can be obtained as either a 20-byte binary digest or as a 40- @@ -119,5 +124,6 @@ LIBBUTL_MODEXPORT namespace butl mutable digest_type bin_; mutable bool done_; + bool empty_; }; } |