aboutsummaryrefslogtreecommitdiff
path: root/libbutl/sha1.mxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-10-05 08:47:17 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-10-05 08:47:17 +0200
commitacadbbc9d82247c039cea12ea5e86c1f4841fdb9 (patch)
tree5a40294ec59e9964e692124cf629a6055f229a5c /libbutl/sha1.mxx
parent88adf3f7f2e9c6f1ea3c722ead41a5579b3292bf (diff)
Add sha{1,256}::reset()
Diffstat (limited to 'libbutl/sha1.mxx')
-rw-r--r--libbutl/sha1.mxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/libbutl/sha1.mxx b/libbutl/sha1.mxx
index f69ae5a..ea87367 100644
--- a/libbutl/sha1.mxx
+++ b/libbutl/sha1.mxx
@@ -40,7 +40,7 @@ LIBBUTL_MODEXPORT namespace butl
class LIBBUTL_SYMEXPORT sha1
{
public:
- sha1 ();
+ sha1 () {reset ();}
// Append binary data.
//
@@ -79,6 +79,11 @@ LIBBUTL_MODEXPORT namespace butl
bool
empty () const {return empty_;}
+ // Reset to the default-constructed state.
+ //
+ void
+ reset ();
+
// Extract result.
//
// It can be obtained as either a 20-byte binary digest or as a 40-