security: Reorganizing source code to prepare for support of two version of NDN certificates

This commit also removes unused ndn_digestSha256 function and deprecates
crypto::sha256 in favor of crypto::computeSha256Digest in util/crypto.hpp.

Change-Id: I24ee50ff073a96b868633bdf2cfade412d3605f3
Refs: #3098
diff --git a/src/management/nfd-command-options.cpp b/src/management/nfd-command-options.cpp
index 1c7a252..6794483 100644
--- a/src/management/nfd-command-options.cpp
+++ b/src/management/nfd-command-options.cpp
@@ -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-2016 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -22,7 +22,7 @@
 #include "nfd-command-options.hpp"
 
 #ifdef NDN_MANAGEMENT_NFD_COMMAND_OPTIONS_KEEP_DEPRECATED_SIGNING_PARAMS
-#include "../security/identity-certificate.hpp"
+#include "../security/v1/identity-certificate.hpp"
 #include "../security/signing-helpers.hpp"
 #endif // NDN_MANAGEMENT_NFD_COMMAND_OPTIONS_KEEP_DEPRECATED_SIGNING_PARAMS
 
@@ -129,7 +129,7 @@
 }
 
 CommandOptions&
-CommandOptions::setSigningCertificate(const IdentityCertificate& certificate)
+CommandOptions::setSigningCertificate(const security::v1::IdentityCertificate& certificate)
 {
   m_signingInfo = makeSigningInfoFromIdentityCertificate(certificate.getName());
   return *this;
diff --git a/src/management/nfd-command-options.hpp b/src/management/nfd-command-options.hpp
index eb69e03..4ca0a6b 100644
--- a/src/management/nfd-command-options.hpp
+++ b/src/management/nfd-command-options.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-2016 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -28,7 +28,11 @@
 
 namespace ndn {
 
+namespace security {
+namespace v1 {
 class IdentityCertificate;
+} // namespace v1
+} // namespace security
 
 namespace nfd {
 
@@ -167,7 +171,7 @@
    */
   DEPRECATED(
   CommandOptions&
-  setSigningCertificate(const IdentityCertificate& certificate));
+  setSigningCertificate(const security::v1::IdentityCertificate& certificate));
 
 #endif // NDN_MANAGEMENT_NFD_COMMAND_OPTIONS_KEEP_DEPRECATED_SIGNING_PARAMS
 
diff --git a/src/management/nfd-controller.hpp b/src/management/nfd-controller.hpp
index 297f113..8674a61 100644
--- a/src/management/nfd-controller.hpp
+++ b/src/management/nfd-controller.hpp
@@ -32,9 +32,9 @@
 
 namespace security {
 class KeyChain;
+class Validator;
 } // namespace security
 class Face;
-class Validator;
 
 namespace nfd {
 
@@ -66,7 +66,7 @@
   /** \brief construct a Controller that uses face for transport,
    *         and uses the passed KeyChain to sign commands
    */
-  Controller(Face& face, security::KeyChain& keyChain, Validator& validator = s_validatorNull);
+  Controller(Face& face, security::KeyChain& keyChain, security::Validator& validator = s_validatorNull);
 
   /** \brief start command execution
    */
@@ -171,7 +171,7 @@
 protected:
   Face& m_face;
   security::KeyChain& m_keyChain;
-  Validator& m_validator;
+  security::Validator& m_validator;
 
 private:
   static ValidatorNull s_validatorNull;