diff --git a/src/util/util.cpp b/src/util/util.cpp
new file mode 100644
index 0000000..1b14896
--- /dev/null
+++ b/src/util/util.cpp
@@ -0,0 +1,60 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014, Regents of the University of California.
+ *
+ * This file is part of NDNS (Named Data Networking Domain Name Service).
+ * See AUTHORS.md for complete list of NDNS authors and contributors.
+ *
+ * NDNS is free software: you can redistribute it and/or modify it under the terms
+ * of the GNU General Public License as published by the Free Software Foundation,
+ * either version 3 of the License, or (at your option) any later version.
+ *
+ * NDNS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.  See the GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * NDNS, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "util.hpp"
+#include <ndn-cxx/security/cryptopp.hpp>
+
+namespace ndn {
+namespace ndns {
+
+NdnsType
+toNdnsType(const std::string& str)
+{
+  if (str == "resp")
+    return NDNS_RESP;
+  else if (str == "nack")
+    return NDNS_NACK;
+  else if (str == "auth")
+    return NDNS_AUTH;
+  else if (str == "raw")
+    return NDNS_RAW;
+  else
+    return NDNS_UNKNOWN;
+}
+
+void
+output(const Data& data, std::ostream& os, const bool isPretty)
+{
+  using namespace CryptoPP;
+  const Block& block = data.wireEncode();
+  if (!isPretty) {
+    StringSource ss(block.wire(), block.size(), true,
+                    new Base64Encoder(new FileSink(os), true, 64));
+  }
+  else {
+    os << "Name: " << data.getName().toUri() << std::endl;
+    os << "KeyLocator: " << data.getSignature().getKeyLocator().getName().toUri() << std::endl;
+    StringSource ss(block.wire(), block.size(), true,
+                    new Base64Encoder(new FileSink(os), true, 64));
+    os << std::endl;
+  }
+}
+
+} // namespace ndns
+} // namespace ndn
diff --git a/src/util/util.hpp b/src/util/util.hpp
index 2733cf1..7acf496 100644
--- a/src/util/util.hpp
+++ b/src/util/util.hpp
@@ -20,23 +20,23 @@
 #ifndef NDNS_UTIL_UTIL_HPP
 #define NDNS_UTIL_UTIL_HPP
 
+#include "ndns-enum.hpp"
+#include <ndn-cxx/data.hpp>
+
 namespace ndn {
 namespace ndns {
 
 NdnsType
-toNdnsType(const std::string& str)
-{
-  if (str == "resp")
-    return NDNS_RESP;
-  else if (str == "nack")
-    return NDNS_NACK;
-  else if (str == "auth")
-    return NDNS_AUTH;
-  else if (str == "raw")
-    return NDNS_RAW;
-  else
-    return NDNS_UNKNOWN;
-}
+toNdnsType(const std::string& str);
+
+/**
+ * @brief print the data in a flexible way
+ * @param data The data to be printed
+ * @param os the ostream that received printed message
+ * @param isPretty whether to use pretty way
+ */
+void
+output(const Data& data, std::ostream& os, const bool isPretty);
 
 } // namespace ndns
 } // namespace ndn
