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
