port NAC to security v2

This commit is based on Lei Pi's commit, which changed certificate version from v1 to v2.
The later changes fix some bugs and refactor algo part of the library to get rid of cryptopp.

Change-Id: I3be7e0341fe85ee69f1b5f1c3ed7421a6c61d0b5
diff --git a/src/encrypted-content.hpp b/src/encrypted-content.hpp
index 2d861a3..8a96fc7 100644
--- a/src/encrypted-content.hpp
+++ b/src/encrypted-content.hpp
@@ -1,11 +1,31 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2014-2018,  Regents of the University of California
+ *
+ * This file is part of gep (Group-based Encryption Protocol for NDN).
+ * See AUTHORS.md for complete list of gep authors and contributors.
+ *
+ * gep 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.
+ *
+ * gep 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
+ * gep, e.g., in COPYING.md file.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * @author Yingdi Yu <yingdi@cs.ucla.edu>
+ */
+
 #ifndef NDN_ENCRYPTED_CONTENT_HPP
 #define NDN_ENCRYPTED_CONTENT_HPP
 
+#include "tlv.hpp"
+#include <list>
 #include <ndn-cxx/encoding/tlv.hpp>
 #include <ndn-cxx/key-locator.hpp>
-#include <list>
-
-#include "tlv.hpp"
 
 namespace ndn {
 namespace gep {
@@ -15,23 +35,24 @@
 public:
   class Error : public ndn::tlv::Error
   {
-    public:
-      explicit
-      Error(const std::string& what)
+  public:
+    explicit Error(const std::string& what)
       : ndn::tlv::Error(what)
-      {
-      }
+    {
+    }
   };
 
 public:
   EncryptedContent();
 
-  EncryptedContent(tlv::AlgorithmTypeValue type, const KeyLocator& keyLocator,
-                   const uint8_t* payload, size_t payloadLen,
-                   const uint8_t* iv = 0, size_t ivLen = 0);
+  EncryptedContent(tlv::AlgorithmTypeValue type,
+                   const KeyLocator& keyLocator,
+                   const uint8_t* payload,
+                   size_t payloadLen,
+                   const uint8_t* iv = 0,
+                   size_t ivLen = 0);
 
-  explicit
-  EncryptedContent(const Block& block);
+  explicit EncryptedContent(const Block& block);
 
   void
   setAlgorithmType(tlv::AlgorithmTypeValue type);
@@ -45,7 +66,7 @@
   bool
   hasKeyLocator() const
   {
-   return m_hasKeyLocator;
+    return m_hasKeyLocator;
   }
 
   void