Added ndn::toHex
diff --git a/ndn-cpp/common.cpp b/ndn-cpp/common.cpp
new file mode 100644
index 0000000..b4c6e45
--- /dev/null
+++ b/ndn-cpp/common.cpp
@@ -0,0 +1,28 @@
+/**
+ * @author: Jeff Thompson
+ * See COPYING for copyright and distribution information.
+ */
+
+#include <sstream>
+#include "common.hpp"
+
+using namespace std;
+
+namespace ndn {
+
+string toHex(const vector<unsigned char> &array) 
+{
+  ostringstream result;
+  result.flags(ios::hex | ios::uppercase);
+  for (unsigned int i = 0; i < array.size(); ++i) {
+    unsigned char x = array[i];
+    if (x < 16)
+      result << '0';
+    result << (unsigned int)x;
+  }
+
+  return result.str();
+}
+
+}
+