diff --git a/src/security/detail/openssl-helper.cpp b/src/security/detail/openssl-helper.cpp
new file mode 100644
index 0000000..25fddc7
--- /dev/null
+++ b/src/security/detail/openssl-helper.cpp
@@ -0,0 +1,41 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2013-2016 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 "openssl-helper.hpp"
+
+namespace ndn {
+namespace security {
+namespace detail {
+
+const EVP_MD*
+toDigestEvpMd(DigestAlgorithm algo)
+{
+  switch (algo) {
+  case DIGEST_ALGORITHM_SHA256:
+    return EVP_sha256();
+  default:
+    return nullptr;
+  }
+}
+
+} // namespace detail
+} // namespace security
+} // namespace ndn
diff --git a/src/security/detail/openssl-helper.hpp b/src/security/detail/openssl-helper.hpp
new file mode 100644
index 0000000..e9e5900
--- /dev/null
+++ b/src/security/detail/openssl-helper.hpp
@@ -0,0 +1,39 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2013-2016 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.
+ */
+
+#ifndef NDN_CXX_SECURITY_DETAIL_OPENSSL_HELPER_HPP
+#define NDN_CXX_SECURITY_DETAIL_OPENSSL_HELPER_HPP
+
+#include "../security-common.hpp"
+#include "openssl.hpp"
+
+namespace ndn {
+namespace security {
+namespace detail {
+
+const EVP_MD*
+toDigestEvpMd(DigestAlgorithm algo);
+
+} // namespace detail
+} // namespace security
+} // namespace ndn
+
+#endif // NDN_CXX_SECURITY_DETAIL_OPENSSL_HELPER_HPP
diff --git a/src/security/security-common.hpp b/src/security/security-common.hpp
index ad3f671..8edb22c 100644
--- a/src/security/security-common.hpp
+++ b/src/security/security-common.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2013-2014 Regents of the University of California.
+ * Copyright (c) 2013-2016 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -22,40 +22,41 @@
 #ifndef NDN_SECURITY_COMMON_HPP
 #define NDN_SECURITY_COMMON_HPP
 
+#include "../common.hpp"
+
 namespace ndn {
 
-namespace signed_interest{
+namespace signed_interest {
 
-enum {
-  POS_SIG_VALUE = -1,
-  POS_SIG_INFO = -2,
-  POS_RANDOM_VAL = -3,
-  POS_TIMESTAMP = -4,
+const ssize_t POS_SIG_VALUE = -1;
+const ssize_t POS_SIG_INFO = -2;
+const ssize_t POS_RANDOM_VAL = -3;
+const ssize_t POS_TIMESTAMP = -4;
 
-  MIN_LENGTH = 4
-};
+const size_t MIN_LENGTH = 4;
 
 } // namespace signed_interest
 
 enum KeyType {
-  KEY_TYPE_RSA   = 0,
-  KEY_TYPE_ECDSA = 1,
-  // KEY_TYPE_DSA,
-  KEY_TYPE_AES   = 128,
-  // KEY_TYPE_DES,
-  // KEY_TYPE_RC4,
-  // KEY_TYPE_RC2
-  KEY_TYPE_NULL  = 255
+  KEY_TYPE_NONE  = 0,
+  /// @deprecated use KEY_TYPE_NONE
+  KEY_TYPE_NULL = KEY_TYPE_NONE,
+
+  KEY_TYPE_RSA   = 1,
+  KEY_TYPE_ECDSA = 2,
+  KEY_TYPE_AES   = 128
 };
 
 enum KeyClass {
+  KEY_CLASS_NONE,
   KEY_CLASS_PUBLIC,
   KEY_CLASS_PRIVATE,
   KEY_CLASS_SYMMETRIC
 };
 
 enum DigestAlgorithm {
-  DIGEST_ALGORITHM_SHA256
+  DIGEST_ALGORITHM_NONE = 0,
+  DIGEST_ALGORITHM_SHA256 = 1
 };
 
 enum EncryptMode {
@@ -65,10 +66,11 @@
 };
 
 enum AclType {
+  ACL_TYPE_NONE,
   ACL_TYPE_PUBLIC,
   ACL_TYPE_PRIVATE
 };
 
 } // namespace ndn
 
-#endif
+#endif // NDN_SECURITY_COMMON_HPP
diff --git a/src/security/transform.hpp b/src/security/transform.hpp
index b9a960c..879902e 100644
--- a/src/security/transform.hpp
+++ b/src/security/transform.hpp
@@ -33,5 +33,6 @@
 #include "transform/hex-decode.hpp"
 #include "transform/base64-encode.hpp"
 #include "transform/base64-decode.hpp"
+#include "transform/digest-filter.hpp"
 
 #endif // NDN_CXX_SECURITY_TRANSFORM_HPP
diff --git a/src/security/transform/digest-filter.cpp b/src/security/transform/digest-filter.cpp
new file mode 100644
index 0000000..9fed4d2
--- /dev/null
+++ b/src/security/transform/digest-filter.cpp
@@ -0,0 +1,109 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2013-2016 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 "digest-filter.hpp"
+#include "../../encoding/buffer.hpp"
+#include "../detail/openssl-helper.hpp"
+
+namespace ndn {
+namespace security {
+namespace transform {
+
+/**
+ * @brief The implementation class which contains the internal state of
+ *        the digest calculator which includes openssl specific structures.
+ */
+class DigestFilter::Impl
+{
+public:
+  Impl()
+    : m_md(BIO_new(BIO_f_md()))
+    , m_sink(BIO_new(BIO_s_null()))
+  {
+    BIO_push(m_md, m_sink);
+  }
+
+  ~Impl()
+  {
+    BIO_free_all(m_md);
+  }
+
+public:
+  BIO* m_md;
+  BIO* m_sink;
+};
+
+DigestFilter::DigestFilter(DigestAlgorithm algo)
+  : m_impl(new Impl)
+{
+  const EVP_MD* md = detail::toDigestEvpMd(algo);
+  if (md == nullptr) {
+    // @todo Add digest algorithm to the error message
+    BOOST_THROW_EXCEPTION(Error(getIndex(), "Unsupported digest algorithm"));
+  }
+
+  if (!BIO_set_md(m_impl->m_md, md)) {
+    // @todo Add digest algorithm to the error message
+    BOOST_THROW_EXCEPTION(Error(getIndex(), "Cannot set digest"));
+  }
+}
+
+size_t
+DigestFilter::convert(const uint8_t* buf, size_t size)
+{
+  int wLen = BIO_write(m_impl->m_md, buf, size);
+
+  if (wLen <= 0) { // fail to write data
+    if (!BIO_should_retry(m_impl->m_md)) {
+      // we haven't written everything but some error happens, and we cannot retry
+      BOOST_THROW_EXCEPTION(Error(getIndex(), "Failed to accept more input"));
+    }
+    return 0;
+  }
+  else { // update number of bytes written
+    return wLen;
+  }
+}
+
+void
+DigestFilter::finalize()
+{
+  auto buffer = make_unique<OBuffer>(EVP_MAX_MD_SIZE);
+
+  int mdLen = BIO_gets(m_impl->m_md, reinterpret_cast<char*>(&(*buffer)[0]), EVP_MAX_MD_SIZE);
+  if (mdLen <= 0)
+    BOOST_THROW_EXCEPTION(Error(getIndex(), "Failed to compute digest"));
+
+  buffer->erase(buffer->begin() + mdLen, buffer->end());
+  setOutputBuffer(std::move(buffer));
+
+  flushAllOutput();
+}
+
+unique_ptr<Transform>
+digestFilter(DigestAlgorithm algo)
+{
+  return make_unique<DigestFilter>(algo);
+}
+
+} // namespace transform
+} // namespace security
+} // namespace ndn
diff --git a/src/security/transform/digest-filter.hpp b/src/security/transform/digest-filter.hpp
new file mode 100644
index 0000000..fdd9c5b
--- /dev/null
+++ b/src/security/transform/digest-filter.hpp
@@ -0,0 +1,71 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2013-2016 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.
+ */
+
+#ifndef NDN_CXX_SECURITY_TRANSFORM_DIGEST_FILTER_HPP
+#define NDN_CXX_SECURITY_TRANSFORM_DIGEST_FILTER_HPP
+
+#include "transform-base.hpp"
+#include "../security-common.hpp"
+
+namespace ndn {
+namespace security {
+namespace transform {
+
+/**
+ * @brief The module to calculate digest.
+ */
+class DigestFilter : public Transform
+{
+public:
+  /**
+   * @brief Create a digest module with algorithm @p algo
+   */
+  explicit
+  DigestFilter(DigestAlgorithm algo);
+
+private:
+  /**
+   * @brief Append data @p buf into digest calculation
+   *
+   * @return The number of bytes that have been accepted
+   */
+  virtual size_t
+  convert(const uint8_t* buf, size_t size) final;
+
+  /**
+   * @brief Finalize digest calculation and write the digest into next module.
+   */
+  virtual void
+  finalize() final;
+
+private:
+  class Impl;
+  unique_ptr<Impl> m_impl;
+};
+
+unique_ptr<Transform>
+digestFilter(DigestAlgorithm algo = DIGEST_ALGORITHM_SHA256);
+
+} // namespace transform
+} // namespace security
+} // namespace ndn
+
+#endif // NDN_CXX_SECURITY_TRANSFORM_DIGEST_FILTER_HPP
diff --git a/src/security/transform/transform-base.cpp b/src/security/transform/transform-base.cpp
index 936e0ae..60e967b 100644
--- a/src/security/transform/transform-base.cpp
+++ b/src/security/transform/transform-base.cpp
@@ -92,6 +92,14 @@
 }
 
 void
+Transform::flushAllOutput()
+{
+  while (!isOutputBufferEmpty()) {
+    flushOutputBuffer();
+  }
+}
+
+void
 Transform::setOutputBuffer(unique_ptr<OBuffer> buffer)
 {
   BOOST_ASSERT(isOutputBufferEmpty());
@@ -139,9 +147,7 @@
 void
 Transform::finalize()
 {
-  while (!isOutputBufferEmpty()) {
-    flushOutputBuffer();
-  }
+  flushAllOutput();
 }
 
 Source::Source()
diff --git a/src/security/transform/transform-base.hpp b/src/security/transform/transform-base.hpp
index 5e3a72b..98faf6d 100644
--- a/src/security/transform/transform-base.hpp
+++ b/src/security/transform/transform-base.hpp
@@ -186,11 +186,20 @@
 
   /**
    * @brief Read the content from output buffer and write it into next module.
+   *
+   * It is not guaranteed that all the content in output buffer will be flushed to next module.
    */
   void
   flushOutputBuffer();
 
   /**
+   * @brief Read the all the content from output buffer and write it into next module.
+   * @post isOutputBufferEmpty() returns true.
+   */
+  void
+  flushAllOutput();
+
+  /**
    * @brief Set output buffer to @p buffer
    */
   void
