diff --git a/model/sync-digest.cc b/model/sync-digest.cc
index a499659..4004614 100644
--- a/model/sync-digest.cc
+++ b/model/sync-digest.cc
@@ -36,9 +36,7 @@
 {
   m_context = EVP_MD_CTX_create ();
 
-  int ok = EVP_DigestInit_ex (m_context, EVP_sha1 (), 0);
-  if (!ok)
-    throw DigestCalculationError () << errinfo_at_line (__LINE__);
+  reset ();
 }
 
 Digest::~Digest ()
@@ -50,7 +48,22 @@
 }
 
 void
-Digest::Finalize ()
+Digest::reset ()
+{
+  if (m_buffer != 0)
+    {
+      delete [] m_buffer;
+      m_buffer = 0;
+    }
+
+  int ok = EVP_DigestInit_ex (m_context, EVP_sha1 (), 0);
+  if (!ok)
+    throw DigestCalculationError () << errinfo_at_line (__LINE__);
+}
+
+
+void
+Digest::finalize ()
 {
   if (m_buffer != 0) return;
 
@@ -66,7 +79,7 @@
 Digest::getHash ()
 {
   if (m_buffer == 0)
-    Finalize ();
+    finalize ();
 
   NS_ASSERT (sizeof (std::size_t) <= m_hashLength);
   
@@ -79,10 +92,10 @@
 Digest::operator == (Digest &digest)
 {
   if (m_buffer == 0)
-    Finalize ();
+    finalize ();
 
   if (digest.m_buffer == 0)
-    digest.Finalize ();
+    digest.finalize ();
   
   NS_ASSERT (m_hashLength == digest.m_hashLength);
 
@@ -90,16 +103,27 @@
 }
 
 
+void
+Digest::update (const uint8_t *buffer, size_t size)
+{
+  // cannot update Digest when it has been finalized
+  if (m_buffer != 0)
+    throw DigestCalculationError () << errinfo_at_line (__LINE__);
+
+  bool ok = EVP_DigestUpdate (m_context, buffer, size);
+  if (!ok)
+    throw DigestCalculationError () << errinfo_at_line (__LINE__);
+}
+
+
 Digest &
 Digest::operator << (const Digest &src)
 {
-  if (src.m_buffer == 0)
+  if (src.m_buffer == 0) 
     throw DigestCalculationError () << errinfo_at_line (__LINE__);
 
-  bool ok = EVP_DigestUpdate (m_context, src.m_buffer, src.m_hashLength);
-  if (!ok)
-    throw DigestCalculationError () << errinfo_at_line (__LINE__);
-  
+  update (src.m_buffer, src.m_hashLength);
+
   return *this;
 }
 
