diff --git a/src/data.cpp b/src/data.cpp
index 8261449..36fdfd4 100644
--- a/src/data.cpp
+++ b/src/data.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,7 +21,7 @@
 
 #include "data.hpp"
 #include "encoding/block-helpers.hpp"
-#include "util/crypto.hpp"
+#include "util/digest.hpp"
 
 namespace ndn {
 
@@ -184,7 +184,7 @@
                                   "(e.g., not signed)"));
     }
     m_fullName = m_name;
-    m_fullName.appendImplicitSha256Digest(crypto::computeSha256Digest(m_wire.wire(), m_wire.size()));
+    m_fullName.appendImplicitSha256Digest(util::Sha256::computeDigest(m_wire.wire(), m_wire.size()));
   }
 
   return m_fullName;
diff --git a/src/interest.cpp b/src/interest.cpp
index 2f54dcb..b35814c 100644
--- a/src/interest.cpp
+++ b/src/interest.cpp
@@ -21,7 +21,6 @@
 
 #include "interest.hpp"
 #include "util/random.hpp"
-#include "util/crypto.hpp"
 #include "data.hpp"
 
 #include <cstring>
diff --git a/src/name-component.cpp b/src/name-component.cpp
index 746f69a..34a3470 100644
--- a/src/name-component.cpp
+++ b/src/name-component.cpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -27,8 +27,8 @@
 
 #include "encoding/block-helpers.hpp"
 #include "encoding/encoding-buffer.hpp"
+#include "util/digest.hpp"
 #include "util/string-helper.hpp"
-#include "util/crypto.hpp"
 
 #include <boost/algorithm/string/trim.hpp>
 
@@ -87,7 +87,6 @@
 {
 }
 
-
 Component
 Component::fromEscapedString(const char* escapedString, size_t beginOffset, size_t endOffset)
 {
@@ -96,7 +95,7 @@
 
   if (trimmedString.compare(0, getSha256DigestUriPrefix().size(),
                             getSha256DigestUriPrefix()) == 0) {
-    if (trimmedString.size() != getSha256DigestUriPrefix().size() + crypto::SHA256_DIGEST_SIZE * 2)
+    if (trimmedString.size() != getSha256DigestUriPrefix().size() + util::Sha256::DIGEST_SIZE * 2)
       BOOST_THROW_EXCEPTION(Error("Cannot convert to ImplicitSha256DigestComponent"
                                   "(expected sha256 in hex encoding)"));
 
@@ -357,15 +356,15 @@
 Component::isImplicitSha256Digest() const
 {
   return (type() == tlv::ImplicitSha256DigestComponent &&
-          value_size() == crypto::SHA256_DIGEST_SIZE);
+          value_size() == util::Sha256::DIGEST_SIZE);
 }
 
 Component
 Component::fromImplicitSha256Digest(const ConstBufferPtr& digest)
 {
-  if (digest->size() != crypto::SHA256_DIGEST_SIZE)
+  if (digest->size() != util::Sha256::DIGEST_SIZE)
     BOOST_THROW_EXCEPTION(Error("Cannot create ImplicitSha256DigestComponent (input digest must be " +
-                                to_string(crypto::SHA256_DIGEST_SIZE) + " octets)"));
+                                to_string(util::Sha256::DIGEST_SIZE) + " octets)"));
 
   return Block(tlv::ImplicitSha256DigestComponent, digest);
 }
@@ -373,9 +372,9 @@
 Component
 Component::fromImplicitSha256Digest(const uint8_t* digest, size_t digestSize)
 {
-  if (digestSize != crypto::SHA256_DIGEST_SIZE)
+  if (digestSize != util::Sha256::DIGEST_SIZE)
     BOOST_THROW_EXCEPTION(Error("Cannot create ImplicitSha256DigestComponent (input digest must be " +
-                                to_string(crypto::SHA256_DIGEST_SIZE) + " octets)"));
+                                to_string(util::Sha256::DIGEST_SIZE) + " octets)"));
 
   return makeBinaryBlock(tlv::ImplicitSha256DigestComponent, digest, digestSize);
 }
diff --git a/src/security/v1/key-chain.cpp b/src/security/v1/key-chain.cpp
index 1916532..9efcb4a 100644
--- a/src/security/v1/key-chain.cpp
+++ b/src/security/v1/key-chain.cpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -24,8 +24,8 @@
 #include "key-chain.hpp"
 #include "../signing-helpers.hpp"
 
-#include "../../util/random.hpp"
 #include "../../util/config-file.hpp"
+#include "../../util/digest.hpp"
 
 #include "sec-public-info-sqlite3.hpp"
 
@@ -755,7 +755,7 @@
                    const Name& keyName, DigestAlgorithm digestAlgorithm) const
 {
   if (keyName == SigningInfo::getDigestSha256Identity())
-    return Block(tlv::SignatureValue, crypto::computeSha256Digest(buf, size));
+    return Block(tlv::SignatureValue, util::Sha256::computeDigest(buf, size));
 
   return m_tpm->signInTpm(buf, size, keyName, digestAlgorithm);
 }
@@ -790,7 +790,7 @@
     .append(sig.getInfo());                                        // signatureInfo
 
   Block sigValue(tlv::SignatureValue,
-                 crypto::computeSha256Digest(signedName.wireEncode().value(),
+                 util::Sha256::computeDigest(signedName.wireEncode().value(),
                                              signedName.wireEncode().value_size()));
 
   sigValue.encode();
diff --git a/src/security/v1/key-chain.hpp b/src/security/v1/key-chain.hpp
index 65821fa..3a84a47 100644
--- a/src/security/v1/key-chain.hpp
+++ b/src/security/v1/key-chain.hpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -32,9 +32,7 @@
 #include "../signature-sha256-with-ecdsa.hpp"
 #include "../digest-sha256.hpp"
 #include "../signing-info.hpp"
-
 #include "../../interest.hpp"
-#include "../../util/crypto.hpp"
 #include "../../util/random.hpp"
 #include <initializer_list>
 
@@ -132,7 +130,7 @@
   /**
    * @brief KeyChain constructor
    *
-   * @sa  http://redmine.named-data.net/issues/2260
+   * @sa  https://redmine.named-data.net/issues/2260
    *
    * @param pibLocator PIB locator
    * @param tpmLocator TPM locator
diff --git a/src/security/v1/public-key.cpp b/src/security/v1/public-key.cpp
index cef7295..7ada249 100644
--- a/src/security/v1/public-key.cpp
+++ b/src/security/v1/public-key.cpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -25,7 +25,7 @@
 #include "public-key.hpp"
 
 #include "../../encoding/oid.hpp"
-#include "../../util/crypto.hpp"
+#include "../../util/digest.hpp"
 #include "cryptopp.hpp"
 
 namespace ndn {
@@ -53,7 +53,7 @@
   if (m_digest.hasWire())
     return m_digest;
   else {
-    m_digest = Block(tlv::KeyDigest, crypto::computeSha256Digest(m_key.buf(), m_key.size()));
+    m_digest = Block(tlv::KeyDigest, util::Sha256::computeDigest(m_key.buf(), m_key.size()));
     m_digest.encode();
     return m_digest;
   }
@@ -119,7 +119,7 @@
 
       m_key.assign(out.begin(), out.end());
     }
-  catch (CryptoPP::BERDecodeErr& err)
+  catch (const CryptoPP::BERDecodeErr& err)
     {
       m_type = KeyType::NONE;
       BOOST_THROW_EXCEPTION(Error("PublicKey decoding error"));
diff --git a/src/security/v2/key-chain.cpp b/src/security/v2/key-chain.cpp
index 45d9277..c6e044c 100644
--- a/src/security/v2/key-chain.cpp
+++ b/src/security/v2/key-chain.cpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -22,6 +22,7 @@
 #include "key-chain.hpp"
 
 #include "../../util/config-file.hpp"
+#include "../../util/digest.hpp"
 #include "../../util/logger.hpp"
 
 #include "../pib/pib-sqlite3.hpp"
@@ -39,7 +40,6 @@
 #include "../transform/private-key.hpp"
 #include "../transform/verifier-filter.hpp"
 #include "../../encoding/buffer-stream.hpp"
-#include "../../util/crypto.hpp"
 
 #include <boost/lexical_cast.hpp>
 
@@ -685,7 +685,7 @@
                const Name& keyName, DigestAlgorithm digestAlgorithm) const
 {
   if (keyName == SigningInfo::getDigestSha256Identity())
-    return Block(tlv::SignatureValue, crypto::computeSha256Digest(buf, size));
+    return Block(tlv::SignatureValue, util::Sha256::computeDigest(buf, size));
 
   return Block(tlv::SignatureValue, m_tpm->sign(buf, size, keyName, digestAlgorithm));
 }
diff --git a/src/security/validator.cpp b/src/security/validator.cpp
index f0f87b7..4862d76 100644
--- a/src/security/validator.cpp
+++ b/src/security/validator.cpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -20,7 +20,7 @@
  */
 
 #include "validator.hpp"
-#include "../util/crypto.hpp"
+#include "../util/digest.hpp"
 #include "../lp/tags.hpp"
 
 #include "v1/cryptopp.hpp"
@@ -234,21 +234,20 @@
 Validator::verifySignature(const uint8_t* buf, const size_t size, const DigestSha256& sig)
 {
   try {
-    ConstBufferPtr buffer = crypto::computeSha256Digest(buf, size);
+    ConstBufferPtr buffer = util::Sha256::computeDigest(buf, size);
     const Block& sigValue = sig.getValue();
 
-    if (buffer != nullptr &&
-        buffer->size() == sigValue.value_size() &&
-        buffer->size() == crypto::SHA256_DIGEST_SIZE) {
+    if (buffer->size() == sigValue.value_size() &&
+        buffer->size() == util::Sha256::DIGEST_SIZE) {
       const uint8_t* p1 = buffer->buf();
       const uint8_t* p2 = sigValue.value();
 
-      return 0 == memcmp(p1, p2, crypto::SHA256_DIGEST_SIZE);
+      return 0 == memcmp(p1, p2, util::Sha256::DIGEST_SIZE);
     }
     else
       return false;
   }
-  catch (const CryptoPP::Exception& e) {
+  catch (const util::Sha256::Error&) {
     return false;
   }
 }
diff --git a/src/util/crypto.cpp b/src/util/crypto.cpp
deleted file mode 100644
index 3083e40..0000000
--- a/src/util/crypto.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2013-2017 Regents of the University of California.
- *
- * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
- *
- * ndn-cxx library is free software: you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later version.
- *
- * ndn-cxx library 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 Lesser General Public License for more details.
- *
- * You should have received copies of the GNU General Public License and GNU Lesser
- * General Public License along with ndn-cxx, e.g., in COPYING.md file.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
- */
-
-#include "crypto.hpp"
-#include "../encoding/buffer-stream.hpp"
-#include "../security/transform/buffer-source.hpp"
-#include "../security/transform/digest-filter.hpp"
-#include "../security/transform/stream-sink.hpp"
-
-namespace ndn {
-namespace crypto {
-
-ConstBufferPtr
-computeSha256Digest(const uint8_t* data, size_t dataLength)
-{
-  namespace tr = security::transform;
-  try {
-    OBufferStream os;
-    tr::bufferSource(data, dataLength) >> tr::digestFilter(DigestAlgorithm::SHA256)
-                                       >> tr::streamSink(os);
-    return os.buf();
-  }
-  catch (const tr::Error&) {
-    return nullptr;
-  }
-}
-
-} // namespace crypto
-} // namespace ndn
diff --git a/src/util/crypto.hpp b/src/util/crypto.hpp
index 860b17d..281e2f2 100644
--- a/src/util/crypto.hpp
+++ b/src/util/crypto.hpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -22,14 +22,21 @@
 #ifndef NDN_UTIL_CRYPTO_HPP
 #define NDN_UTIL_CRYPTO_HPP
 
-#include "../common.hpp"
-#include "../encoding/buffer.hpp"
+/**
+ * @file
+ * @deprecated use <ndn-cxx/util/digest.hpp>
+ */
+
+#include "digest.hpp"
 
 namespace ndn {
 namespace crypto {
 
-/// @brief number of octets in a SHA256 digest
-const size_t SHA256_DIGEST_SIZE = 32;
+/**
+ * @brief number of octets in a SHA256 digest
+ * @deprecated use ndn::util::Sha256::DIGEST_SIZE
+ */
+DEPRECATED(const size_t SHA256_DIGEST_SIZE) = util::Sha256::DIGEST_SIZE;
 
 /**
  * @brief Compute the SHA-256 digest of data.
@@ -37,9 +44,15 @@
  * @param data Pointer to the input byte array.
  * @param dataLength The length of data.
  * @return A pointer to a buffer of SHA256_DIGEST_SIZE bytes.
+ *
+ * @deprecated use ndn::util::Sha256::computeDigest()
  */
-ConstBufferPtr
-computeSha256Digest(const uint8_t* data, size_t dataLength);
+DEPRECATED()
+inline ConstBufferPtr
+computeSha256Digest(const uint8_t* data, size_t dataLength)
+{
+  return util::Sha256::computeDigest(data, dataLength);
+}
 
 } // namespace crypto
 } // namespace ndn
diff --git a/src/util/digest.cpp b/src/util/digest.cpp
index 55eb459..8053fdb 100644
--- a/src/util/digest.cpp
+++ b/src/util/digest.cpp
@@ -29,6 +29,8 @@
 namespace ndn {
 namespace util {
 
+const size_t Sha256::DIGEST_SIZE;
+
 Sha256::Sha256()
 {
   reset();
@@ -130,6 +132,14 @@
   return toHex(*buf);
 }
 
+ConstBufferPtr
+Sha256::computeDigest(const uint8_t* buffer, size_t size)
+{
+  Sha256 sha256;
+  sha256.update(buffer, size);
+  return sha256.computeDigest();
+}
+
 std::ostream&
 operator<<(std::ostream& os, Sha256& digest)
 {
diff --git a/src/util/digest.hpp b/src/util/digest.hpp
index 1c3c857..12dbd96 100644
--- a/src/util/digest.hpp
+++ b/src/util/digest.hpp
@@ -22,7 +22,6 @@
 #ifndef NDN_UTIL_DIGEST_HPP
 #define NDN_UTIL_DIGEST_HPP
 
-#include "crypto.hpp"
 #include "../encoding/block.hpp"
 #include "../encoding/buffer-stream.hpp"
 #include "../security/transform/step-source.hpp"
@@ -56,6 +55,11 @@
   };
 
   /**
+   * @brief Length in bytes of a SHA-256 digest.
+   */
+  static const size_t DIGEST_SIZE = 32;
+
+  /**
    * @brief Create an empty SHA-256 digest.
    */
   Sha256();
@@ -156,16 +160,13 @@
   toString();
 
   /**
-   * @brief Compute a one-time SHA-256 digest.
+   * @brief Stateless SHA-256 digest calculation.
    * @param buffer the input buffer
    * @param size the size of the input buffer
    * @return SHA-256 digest of the input buffer
    */
   static ConstBufferPtr
-  computeDigest(const uint8_t* buffer, size_t size)
-  {
-    return crypto::computeSha256Digest(buffer, size);
-  }
+  computeDigest(const uint8_t* buffer, size_t size);
 
 private:
   unique_ptr<security::transform::StepSource> m_input;
diff --git a/src/util/in-memory-storage.cpp b/src/util/in-memory-storage.cpp
index 69f2b5a..bc1beac 100644
--- a/src/util/in-memory-storage.cpp
+++ b/src/util/in-memory-storage.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).
  *
@@ -22,8 +22,6 @@
 #include "in-memory-storage.hpp"
 #include "in-memory-storage-entry.hpp"
 
-#include "crypto.hpp"
-
 #include "../security/signature-sha256-with-rsa.hpp"
 
 namespace ndn {
@@ -423,9 +421,7 @@
 {
   Cache::index<byFullName>::type::iterator it = m_cache.get<byFullName>().end();
 
-  const Data* ptr = NULL;
-
-  return const_iterator(ptr, &m_cache, it);
+  return const_iterator(nullptr, &m_cache, it);
 }
 
 void
diff --git a/tests/unit-tests/exclude.t.cpp b/tests/unit-tests/exclude.t.cpp
index 1e074d5..a6823c6 100644
--- a/tests/unit-tests/exclude.t.cpp
+++ b/tests/unit-tests/exclude.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).
  *
@@ -20,7 +20,7 @@
  */
 
 #include "exclude.hpp"
-#include "util/crypto.hpp"
+#include "util/digest.hpp"
 
 #include "boost-test.hpp"
 
@@ -86,7 +86,7 @@
 
 BOOST_AUTO_TEST_CASE(Before)
 {
-  // based on http://redmine.named-data.net/issues/1158
+  // based on https://redmine.named-data.net/issues/1158
   ndn::Exclude e;
   BOOST_REQUIRE_NO_THROW(e.excludeBefore(name::Component("PuQxMaf91")));
 
@@ -237,7 +237,7 @@
 
 BOOST_AUTO_TEST_SUITE(ImplicitDigest) // exclude ImplicitSha256DigestComponent
 
-/** \brief make a name::Component with an octet repeated crypto::SHA256_DIGEST_SIZE times
+/** \brief make a name::Component with an octet repeated util::Sha256::DIGEST_SIZE times
  *  \param octet the octet to fill the component
  *  \param isDigest whether to make an ImplicitSha256DigestComponent or a generic NameComponent
  *  \param lastOctet if non-negative, set the last octet to a different value
@@ -245,10 +245,10 @@
 static name::Component
 makeComponent(uint8_t octet, bool isDigest, int lastOctet = -1)
 {
-  uint8_t wire[crypto::SHA256_DIGEST_SIZE];
+  uint8_t wire[util::Sha256::DIGEST_SIZE];
   std::memset(wire, octet, sizeof(wire));
   if (lastOctet >= 0) {
-    wire[crypto::SHA256_DIGEST_SIZE - 1] = static_cast<uint8_t>(lastOctet);
+    wire[util::Sha256::DIGEST_SIZE - 1] = static_cast<uint8_t>(lastOctet);
   }
 
   if (isDigest) {
diff --git a/tests/unit-tests/security/digest-sha256.t.cpp b/tests/unit-tests/security/digest-sha256.t.cpp
index 732efe6..6facb98 100644
--- a/tests/unit-tests/security/digest-sha256.t.cpp
+++ b/tests/unit-tests/security/digest-sha256.t.cpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * 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,6 +21,7 @@
 
 #include "security/digest-sha256.hpp"
 #include "security/validator.hpp"
+#include "util/digest.hpp"
 #include "util/string-helper.hpp"
 
 #include "identity-management-fixture.hpp"
@@ -35,7 +36,7 @@
 BOOST_AUTO_TEST_CASE(Sha256)
 {
   char content[6] = "1234\n";
-  ConstBufferPtr buf = crypto::computeSha256Digest(reinterpret_cast<uint8_t*>(content), 5);
+  ConstBufferPtr buf = util::Sha256::computeDigest(reinterpret_cast<uint8_t*>(content), 5);
 
   BOOST_CHECK_EQUAL(toHex(buf->buf(), buf->size(), false),
                     "a883dafc480d466ee04e0d6da986bd78eb1fdd2178d04693723da3a8f95d42f4");
diff --git a/tests/unit-tests/util/crypto.t.cpp b/tests/unit-tests/util/crypto.t.cpp
deleted file mode 100644
index 7770245..0000000
--- a/tests/unit-tests/util/crypto.t.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2013-2017 Regents of the University of California.
- *
- * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
- *
- * ndn-cxx library is free software: you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later version.
- *
- * ndn-cxx library 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 Lesser General Public License for more details.
- *
- * You should have received copies of the GNU General Public License and GNU Lesser
- * General Public License along with ndn-cxx, e.g., in COPYING.md file.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
- */
-
-#include "util/crypto.hpp"
-
-#include "boost-test.hpp"
-
-namespace ndn {
-namespace crypto {
-namespace tests {
-
-BOOST_AUTO_TEST_SUITE(Util)
-BOOST_AUTO_TEST_SUITE(TestCrypto)
-
-BOOST_AUTO_TEST_CASE(Basic)
-{
-  const std::string testString = "Hello, world!";
-  auto result = computeSha256Digest(reinterpret_cast<const uint8_t*>(testString.data()),
-                                    testString.size());
-
-  BOOST_CHECK_EQUAL(result->size(), SHA256_DIGEST_SIZE);
-
-  const uint8_t expectedSha256[] = {0x31, 0x5f, 0x5b, 0xdb, 0x76, 0xd0, 0x78, 0xc4,
-                                    0x3b, 0x8a, 0xc0, 0x06, 0x4e, 0x4a, 0x01, 0x64,
-                                    0x61, 0x2b, 0x1f, 0xce, 0x77, 0xc8, 0x69, 0x34,
-                                    0x5b, 0xfc, 0x94, 0xc7, 0x58, 0x94, 0xed, 0xd3};
-  BOOST_CHECK_EQUAL_COLLECTIONS(result->begin(), result->end(),
-                                expectedSha256, expectedSha256 + sizeof(expectedSha256));
-}
-
-BOOST_AUTO_TEST_SUITE_END() // TestCrypto
-BOOST_AUTO_TEST_SUITE_END() // Util
-
-} // namespace tests
-} // namespace crypto
-} // namespace ndn
diff --git a/tests/unit-tests/util/digest.t.cpp b/tests/unit-tests/util/digest.t.cpp
index 36a72e2..d8614c1 100644
--- a/tests/unit-tests/util/digest.t.cpp
+++ b/tests/unit-tests/util/digest.t.cpp
@@ -21,6 +21,7 @@
 
 #include "util/digest.hpp"
 #include "util/string-helper.hpp"
+#include "encoding/endian.hpp"
 
 #include "boost-test.hpp"
 
@@ -33,44 +34,44 @@
 
 BOOST_AUTO_TEST_CASE(Basic)
 {
-  const uint8_t origin[] = {0x01, 0x02, 0x03, 0x04};
-  ConstBufferPtr digest1 = crypto::computeSha256Digest(origin, sizeof(origin));
+  const uint8_t input[] = {0x01, 0x02, 0x03, 0x04};
+  auto expected = fromHex("9f64a747e1b97f131fabb6b447296c9b6f0201e79fb3c5356e6c77e89b6a806a");
 
   Sha256 statefulSha256;
   BOOST_CHECK_EQUAL(statefulSha256.empty(), true);
 
-  statefulSha256.update(origin, 1);
-  statefulSha256.update(origin + 1, 1);
-  statefulSha256.update(origin + 2, 1);
-  statefulSha256.update(origin + 3, 1);
-  ConstBufferPtr digest2 = statefulSha256.computeDigest();
-  BOOST_CHECK_EQUAL_COLLECTIONS(digest1->buf(), digest1->buf() + digest1->size(),
-                                digest2->buf(), digest2->buf() + digest2->size());
+  statefulSha256.update(input, 1);
+  statefulSha256.update(input + 1, 1);
+  statefulSha256.update(input + 2, 1);
+  statefulSha256.update(input + 3, 1);
+  ConstBufferPtr digest = statefulSha256.computeDigest();
+  BOOST_CHECK_EQUAL(digest->size(), Sha256::DIGEST_SIZE);
+  BOOST_CHECK_EQUAL_COLLECTIONS(expected->buf(), expected->buf() + expected->size(),
+                                digest->buf(), digest->buf() + digest->size());
 }
 
 BOOST_AUTO_TEST_CASE(ConstructFromStream)
 {
-  const std::string input = "Hello, World!";
-  ConstBufferPtr digest1 = crypto::computeSha256Digest(reinterpret_cast<const uint8_t*>(input.data()),
-                                                       input.size());
+  const std::string input = "Hello, world!";
+  auto expected = fromHex("315f5bdb76d078c43b8ac0064e4a0164612b1fce77c869345bfc94c75894edd3");
 
   std::istringstream is(input);
   Sha256 sha(is);
   BOOST_CHECK_EQUAL(sha.empty(), false);
-  BOOST_CHECK_EQUAL(sha.toString(), "DFFD6021BB2BD5B0AF676290809EC3A53191DD81C7F70A4B28688A362182986F");
+  BOOST_CHECK_EQUAL(sha.toString(), "315F5BDB76D078C43B8AC0064E4A0164612B1FCE77C869345BFC94C75894EDD3");
 
-  ConstBufferPtr digest2 = sha.computeDigest();
-  BOOST_CHECK_EQUAL_COLLECTIONS(digest1->buf(), digest1->buf() + digest1->size(),
-                                digest2->buf(), digest2->buf() + digest2->size());
+  ConstBufferPtr digest = sha.computeDigest();
+  BOOST_CHECK_EQUAL_COLLECTIONS(expected->buf(), expected->buf() + expected->size(),
+                                digest->buf(), digest->buf() + digest->size());
 }
 
 BOOST_AUTO_TEST_CASE(Compare)
 {
   const uint8_t origin[] = {0x01, 0x02, 0x03, 0x04};
 
-  Sha256 digest;
-  digest.update(origin, sizeof(origin));
-  digest.computeDigest();
+  Sha256 digest1;
+  digest1.update(origin, sizeof(origin));
+  digest1.computeDigest();
 
   Sha256 digest2;
   digest2.update(origin, 1);
@@ -79,46 +80,43 @@
   digest2.update(origin + 3, 1);
   digest2.computeDigest();
 
-  BOOST_CHECK_EQUAL(digest == digest2, true);
-  BOOST_CHECK_EQUAL(digest != digest2, false);
+  BOOST_CHECK_EQUAL(digest1 == digest2, true);
+  BOOST_CHECK_EQUAL(digest1 != digest2, false);
 }
 
 BOOST_AUTO_TEST_CASE(InsertionOperatorSha256)
 {
-  const uint8_t origin[] = {0x94, 0xEE, 0x05, 0x93, 0x35, 0xE5, 0x87, 0xE5,
-                            0x01, 0xCC, 0x4B, 0xF9, 0x06, 0x13, 0xE0, 0x81,
-                            0x4F, 0x00, 0xA7, 0xB0, 0x8B, 0xC7, 0xC6, 0x48,
-                            0xFD, 0x86, 0x5A, 0x2A, 0xF6, 0xA2, 0x2C, 0xC2};
-  ConstBufferPtr digest1 = crypto::computeSha256Digest(origin, sizeof(origin));
+  auto expected = fromHex("d7bd34bfe44a18d2aa755a344fe3e6b06ed0473772e6dfce16ac71ba0b0a241c");
 
   Sha256 innerDigest;
   innerDigest << "TEST";
 
   Sha256 statefulSha256;
   statefulSha256 << innerDigest;
-  ConstBufferPtr digest2 = statefulSha256.computeDigest();
+  ConstBufferPtr digest = statefulSha256.computeDigest();
 
-  BOOST_CHECK_EQUAL_COLLECTIONS(digest1->buf(), digest1->buf() + digest1->size(),
-                                digest2->buf(), digest2->buf() + digest2->size());
+  BOOST_CHECK_EQUAL(statefulSha256.empty(), false);
+  BOOST_CHECK_EQUAL_COLLECTIONS(expected->buf(), expected->buf() + expected->size(),
+                                digest->buf(), digest->buf() + digest->size());
 }
 
 BOOST_AUTO_TEST_CASE(InsertionOperatorString)
 {
-  const std::string str = "Hello, World!";
-  ConstBufferPtr digest1 = crypto::computeSha256Digest(reinterpret_cast<const uint8_t*>(str.data()),
-                                                       str.size());
+  const std::string input = "Hello, world!";
+  auto expected = fromHex("315f5bdb76d078c43b8ac0064e4a0164612b1fce77c869345bfc94c75894edd3");
 
   Sha256 statefulSha256;
-  statefulSha256 << str;
-  ConstBufferPtr digest2 = statefulSha256.computeDigest();
+  statefulSha256 << input;
+  ConstBufferPtr digest = statefulSha256.computeDigest();
 
-  BOOST_CHECK_EQUAL_COLLECTIONS(digest1->buf(), digest1->buf() + digest1->size(),
-                                digest2->buf(), digest2->buf() + digest2->size());
+  BOOST_CHECK_EQUAL(statefulSha256.empty(), false);
+  BOOST_CHECK_EQUAL_COLLECTIONS(expected->buf(), expected->buf() + expected->size(),
+                                digest->buf(), digest->buf() + digest->size());
 }
 
 BOOST_AUTO_TEST_CASE(InsertionOperatorBlock)
 {
-  const uint8_t origin[] = {
+  const uint8_t input[] = {
     0x16, 0x1b, // SignatureInfo
       0x1b, 0x01, // SignatureType
         0x01, // Sha256WithRsa
@@ -131,32 +129,31 @@
           0x08, 0x07,
             0x6c, 0x6f, 0x63, 0x61, 0x74, 0x6f, 0x72
   };
-  ConstBufferPtr digest1 = crypto::computeSha256Digest(origin, sizeof(origin));
+  auto expected = fromHex("b372edfd4d6a4db2cfeaeead6c34fdee9b9e759f7b8d799cf8067e39e7f2886c");
 
   Sha256 statefulSha256;
-  Block block(origin, sizeof(origin));
-  statefulSha256 << block;
-  ConstBufferPtr digest2 = statefulSha256.computeDigest();
+  statefulSha256 << Block{input, sizeof(input)};
+  ConstBufferPtr digest = statefulSha256.computeDigest();
 
-  BOOST_CHECK_EQUAL_COLLECTIONS(digest1->buf(), digest1->buf() + digest1->size(),
-                                digest2->buf(), digest2->buf() + digest2->size());
+  BOOST_CHECK_EQUAL(statefulSha256.empty(), false);
+  BOOST_CHECK_EQUAL_COLLECTIONS(expected->buf(), expected->buf() + expected->size(),
+                                digest->buf(), digest->buf() + digest->size());
 }
 
 BOOST_AUTO_TEST_CASE(InsertionOperatorUint64t)
 {
-  const uint64_t origin[] = {1, 2, 3, 4};
-  ConstBufferPtr digest1 = crypto::computeSha256Digest(reinterpret_cast<const uint8_t*>(origin),
-                                                       sizeof(origin));
+  const uint64_t input[] = {1, 2, 3, 4};
+  auto expected = fromHex("7236c00c170036c6de133a878210ddd58567aa1d0619a0f70f69e38ae6f916e9");
 
   Sha256 statefulSha256;
-  statefulSha256 << origin[0];
-  statefulSha256 << origin[1];
-  statefulSha256 << origin[2];
-  statefulSha256 << origin[3];
-  ConstBufferPtr digest2 = statefulSha256.computeDigest();
+  for (size_t i = 0; i < sizeof(input) / sizeof(uint64_t); ++i) {
+    statefulSha256 << htobe64(input[i]);
+  }
+  ConstBufferPtr digest = statefulSha256.computeDigest();
 
-  BOOST_CHECK_EQUAL_COLLECTIONS(digest1->buf(), digest1->buf() + digest1->size(),
-                                digest2->buf(), digest2->buf() + digest2->size());
+  BOOST_CHECK_EQUAL(statefulSha256.empty(), false);
+  BOOST_CHECK_EQUAL_COLLECTIONS(expected->buf(), expected->buf() + expected->size(),
+                                digest->buf(), digest->buf() + digest->size());
 }
 
 BOOST_AUTO_TEST_CASE(Reset)
@@ -183,11 +180,12 @@
 
 BOOST_AUTO_TEST_CASE(StaticComputeDigest)
 {
-  const uint8_t origin[] = {0x01, 0x02, 0x03, 0x04};
-  ConstBufferPtr digest1 = crypto::computeSha256Digest(origin, sizeof(origin));
-  ConstBufferPtr digest2 = Sha256::computeDigest(origin, sizeof(origin));
-  BOOST_CHECK_EQUAL_COLLECTIONS(digest1->buf(), digest1->buf() + digest1->size(),
-                                digest2->buf(), digest2->buf() + digest2->size());
+  const uint8_t input[] = {0x01, 0x02, 0x03, 0x04};
+  auto expected = fromHex("9f64a747e1b97f131fabb6b447296c9b6f0201e79fb3c5356e6c77e89b6a806a");
+
+  ConstBufferPtr digest = Sha256::computeDigest(input, sizeof(input));
+  BOOST_CHECK_EQUAL_COLLECTIONS(expected->buf(), expected->buf() + expected->size(),
+                                digest->buf(), digest->buf() + digest->size());
 }
 
 BOOST_AUTO_TEST_CASE(Print)
@@ -196,14 +194,14 @@
                             0x01, 0xCC, 0x4B, 0xF9, 0x06, 0x13, 0xE0, 0x81,
                             0x4F, 0x00, 0xA7, 0xB0, 0x8B, 0xC7, 0xC6, 0x48,
                             0xFD, 0x86, 0x5A, 0x2A, 0xF6, 0xA2, 0x2C, 0xC2};
-  std::string hexString = toHex(origin, sizeof(origin));
+  std::string expected = toHex(origin, sizeof(origin));
 
   Sha256 digest;
   digest << "TEST";
   std::ostringstream os;
   os << digest;
-  BOOST_CHECK_EQUAL(os.str(), hexString);
-  BOOST_CHECK_EQUAL(digest.toString(), hexString);
+  BOOST_CHECK_EQUAL(os.str(), expected);
+  BOOST_CHECK_EQUAL(digest.toString(), expected);
 }
 
 BOOST_AUTO_TEST_SUITE_END() // TestSha256
diff --git a/tests/unit-tests/util/in-memory-storage-common.t.cpp b/tests/unit-tests/util/in-memory-storage-common.t.cpp
index a4a992b..5c83391 100644
--- a/tests/unit-tests/util/in-memory-storage-common.t.cpp
+++ b/tests/unit-tests/util/in-memory-storage-common.t.cpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -23,7 +23,7 @@
 #include "util/in-memory-storage-fifo.hpp"
 #include "util/in-memory-storage-lfu.hpp"
 #include "util/in-memory-storage-lru.hpp"
-#include "util/crypto.hpp"
+#include "util/digest.hpp"
 #include "security/signature-sha256-with-rsa.hpp"
 
 #include "boost-test.hpp"
@@ -274,7 +274,7 @@
 {
   shared_ptr<Data> data = makeData("/digest/compute");
 
-  ConstBufferPtr digest1 = crypto::computeSha256Digest(data->wireEncode().wire(), data->wireEncode().size());
+  ConstBufferPtr digest1 = Sha256::computeDigest(data->wireEncode().wire(), data->wireEncode().size());
   BOOST_CHECK_EQUAL(digest1->size(), 32);
 
   InMemoryStorageEntry entry;
@@ -372,7 +372,7 @@
   shared_ptr<Data> data7 = makeData("/c/c/1");
   ims.insert(*data7);
 
-  ConstBufferPtr digest1 = crypto::computeSha256Digest(data->wireEncode().wire(), data->wireEncode().size());
+  ConstBufferPtr digest1 = Sha256::computeDigest(data->wireEncode().wire(), data->wireEncode().size());
 
   Name name("/a");
   ims.erase(name);
@@ -393,7 +393,7 @@
   shared_ptr<Data> data3 = makeData("/z/z/z");
   ims.insert(*data3);
 
-  ConstBufferPtr digest1 = crypto::computeSha256Digest(data->wireEncode().wire(), data->wireEncode().size());
+  ConstBufferPtr digest1 = Sha256::computeDigest(data->wireEncode().wire(), data->wireEncode().size());
 
   shared_ptr<Interest> interest = makeInterest("");
   interest->setName(Name(name).appendImplicitSha256Digest(digest1->buf(), digest1->size()));
@@ -928,9 +928,9 @@
   Name n2 = insert(2, "ndn:/A");
   insert(3, "ndn:/A/B");
 
-  uint8_t digest00[crypto::SHA256_DIGEST_SIZE];
+  uint8_t digest00[Sha256::DIGEST_SIZE];
   std::fill_n(digest00, sizeof(digest00), 0x00);
-  uint8_t digestFF[crypto::SHA256_DIGEST_SIZE];
+  uint8_t digestFF[Sha256::DIGEST_SIZE];
   std::fill_n(digestFF, sizeof(digestFF), 0xFF);
 
   Exclude excludeDigest;
