util: Add stateful digest

Change-Id: I6ed564dc9146d180cec2848a73ec9e8e8f10d921
Refs: #1934
diff --git a/src/util/concepts.hpp b/src/util/concepts.hpp
index dee15d3..94baeaa 100644
--- a/src/util/concepts.hpp
+++ b/src/util/concepts.hpp
@@ -49,6 +49,23 @@
   }
 };
 
+template<class X>
+class Hashable
+{
+public:
+  BOOST_CONCEPT_USAGE(Hashable)
+  {
+    X hash;
+
+    uint8_t* buf = 0;
+    size_t size = hash.DigestSize();
+
+    hash.Update(buf, size);
+    hash.Final(buf);
+    hash.Restart();
+  }
+};
+
 } // namespace ndn
 
 #endif // NDN_UTIL_CONCEPTS_HPP