diff --git a/src/util/string-helper.cpp b/src/util/string-helper.cpp
index 0f54e14..ed3c961 100644
--- a/src/util/string-helper.cpp
+++ b/src/util/string-helper.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2013-2016 Regents of the University of California.
+ * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -21,13 +21,15 @@
 
 #include "string-helper.hpp"
 #include "../encoding/buffer-stream.hpp"
-#include "../security/v1/cryptopp.hpp"
+#include "../security/transform/buffer-source.hpp"
+#include "../security/transform/hex-decode.hpp"
+#include "../security/transform/stream-sink.hpp"
+
+#include <boost/algorithm/string/trim.hpp>
 
 #include <sstream>
 #include <iomanip>
 
-#include <boost/algorithm/string/trim.hpp>
-
 namespace ndn {
 
 void
@@ -73,7 +75,7 @@
 }
 
 int
-fromHexChar(uint8_t c)
+fromHexChar(char c)
 {
   if (c >= '0' && c <= '9')
     return c - '0';
@@ -85,25 +87,20 @@
     return -1;
 }
 
-shared_ptr<const Buffer>
+shared_ptr<Buffer>
 fromHex(const std::string& hexString)
 {
-  if (hexString.size() % 2 != 0) {
-    BOOST_THROW_EXCEPTION(StringHelperError("Invalid number of characters in the supplied hex "
-                                            "string"));
-  }
-
-  using namespace CryptoPP;
+  namespace tr = security::transform;
 
   OBufferStream os;
-  StringSource(hexString, true, new HexDecoder(new FileSink(os)));
-  shared_ptr<const Buffer> buffer = os.buf();
-
-  if (buffer->size() * 2 != hexString.size()) {
-    BOOST_THROW_EXCEPTION(StringHelperError("The supplied hex string contains non-hex characters"));
+  try {
+    tr::bufferSource(hexString) >> tr::hexDecode() >> tr::streamSink(os);
+  }
+  catch (const tr::Error& e) {
+    BOOST_THROW_EXCEPTION(StringHelperError(std::string("Conversion from hex failed: ") + e.what()));
   }
 
-  return buffer;
+  return os.buf();
 }
 
 void
diff --git a/src/util/string-helper.hpp b/src/util/string-helper.hpp
index 4be9e4d..3b2011f 100644
--- a/src/util/string-helper.hpp
+++ b/src/util/string-helper.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2013-2015 Regents of the University of California.
+ * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -19,8 +19,8 @@
  * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
  */
 
-#ifndef NDN_STRING_HELPER_HPP
-#define NDN_STRING_HELPER_HPP
+#ifndef NDN_UTIL_STRING_HELPER_HPP
+#define NDN_UTIL_STRING_HELPER_HPP
 
 #include "../common.hpp"
 #include "../encoding/buffer.hpp"
@@ -96,12 +96,18 @@
 toHex(const Buffer& buffer, bool isUpperCase = true);
 
 /**
+ * @brief Convert the hex character to an integer from 0 to 15, or -1 if not a hex character
+ */
+int
+fromHexChar(char c);
+
+/**
  * @brief Convert the hex string to buffer
  * @param hexString sequence of pairs of hex numbers (lower and upper case can be mixed)
  *        without any whitespace separators (e.g., "48656C6C6F2C20776F726C6421")
  * @throw StringHelperError if input is invalid
  */
-shared_ptr<const Buffer>
+shared_ptr<Buffer>
 fromHex(const std::string& hexString);
 
 /**
@@ -123,12 +129,6 @@
 trim(std::string& str);
 
 /**
- * @brief Convert the hex character to an integer from 0 to 15, or -1 if not a hex character
- */
-int
-fromHexChar(uint8_t c);
-
-/**
  * @brief Decode a percent-encoded string
  * @see RFC 3986 section 2
  *
@@ -144,4 +144,4 @@
 
 } // namespace ndn
 
-#endif // NDN_STRING_HELPER_HPP
+#endif // NDN_UTIL_STRING_HELPER_HPP
diff --git a/tests/unit-tests/util/string-helper.t.cpp b/tests/unit-tests/util/string-helper.t.cpp
index 22e8659..65b3e50 100644
--- a/tests/unit-tests/util/string-helper.t.cpp
+++ b/tests/unit-tests/util/string-helper.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2013-2016 Regents of the University of California.
+ * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -53,7 +53,7 @@
   //   if (ch % 8 == 7)
   //     std::cout << std::endl;
   // }
-  std::vector<std::pair<unsigned char, int>> hexMap{
+  static const std::vector<std::pair<char, int>> hexMap{
     {0x0, -1}, {0x1, -1}, {0x2, -1}, {0x3, -1}, {0x4, -1}, {0x5, -1}, {0x6, -1}, {0x7, -1},
     {0x8, -1}, {0x9, -1}, {0xa, -1}, {0xb, -1}, {0xc, -1}, {0xd, -1}, {0xe, -1}, {0xf, -1},
     {0x10, -1}, {0x11, -1}, {0x12, -1}, {0x13, -1}, {0x14, -1}, {0x15, -1}, {0x16, -1}, {0x17, -1},
@@ -87,24 +87,26 @@
     {0xf0, -1}, {0xf1, -1}, {0xf2, -1}, {0xf3, -1}, {0xf4, -1}, {0xf5, -1}, {0xf6, -1}, {0xf7, -1},
     {0xf8, -1}, {0xf9, -1}, {0xfa, -1}, {0xfb, -1}, {0xfc, -1}, {0xfd, -1}, {0xfe, -1}, {0xff, -1}
   };
+
   for (const auto& item : hexMap) {
-    BOOST_CHECK_EQUAL(fromHexChar(static_cast<char>(item.first)), item.second);
+    BOOST_CHECK_EQUAL(fromHexChar(item.first), item.second);
   }
 }
 
 BOOST_AUTO_TEST_CASE(FromHex)
 {
-  BOOST_CHECK_NO_THROW(fromHex("48656c6c6f2c20776f726c6421"));
+  BOOST_CHECK(*fromHex("") == Buffer{});
   BOOST_CHECK(*fromHex("48656c6c6f2c20776f726c6421") ==
-    (std::vector<uint8_t>{0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x2c, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x21}));
-
-  BOOST_CHECK_NO_THROW(fromHex("012a3Bc4defAB5CdEF"));
+              (std::vector<uint8_t>{0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x2c, 0x20,
+                                    0x77, 0x6f, 0x72, 0x6c, 0x64, 0x21}));
   BOOST_CHECK(*fromHex("012a3Bc4defAB5CdEF") ==
-    (std::vector<uint8_t>{0x01, 0x2a, 0x3b, 0xc4, 0xde, 0xfa, 0xb5, 0xcd, 0xef}));
+              (std::vector<uint8_t>{0x01, 0x2a, 0x3b, 0xc4, 0xde,
+                                    0xfa, 0xb5, 0xcd, 0xef}));
 
   BOOST_CHECK_THROW(fromHex("1"), StringHelperError);
   BOOST_CHECK_THROW(fromHex("zz"), StringHelperError);
   BOOST_CHECK_THROW(fromHex("00az"), StringHelperError);
+  BOOST_CHECK_THROW(fromHex("1234z"), StringHelperError);
 }
 
 BOOST_AUTO_TEST_CASE(Trim)
