update request id generation
Change-Id: I72d864385093a5f1d849d6e9cfe4e6d5ee2882ac
diff --git a/src/ndncert-common.cpp b/src/ndncert-common.cpp
index 3e31596..439b5f5 100644
--- a/src/ndncert-common.cpp
+++ b/src/ndncert-common.cpp
@@ -97,5 +97,16 @@
return json;
}
+std::string
+hexlify(const uint8_t* bytes, size_t byteLen)
+{
+ std::stringstream ss;
+ ss << std::hex;
+ for (size_t i = 0; i < byteLen; i++) {
+ ss << std::setw(2) << std::setfill('0') << (int)bytes[i];
+ }
+ return ss.str();
+}
+
} // namespace ndncert
} // namespace ndn