Finalize switch to v2 security
Change-Id: I1da06c817a7b3455fda1033ee530cde3221f02b7
Refs: #4091
diff --git a/src/storage/index.cpp b/src/storage/index.cpp
index 3197a70..3eb2cce 100644
--- a/src/storage/index.cpp
+++ b/src/storage/index.cpp
@@ -1,5 +1,5 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
* Copyright (c) 2014-2017, Regents of the University of California.
*
* This file is part of NDN repo-ng (Next generation of NDN repository).
@@ -19,8 +19,8 @@
#include "index.hpp"
-#include <ndn-cxx/util/crypto.hpp>
-#include "ndn-cxx/security/signature-sha256-with-rsa.hpp"
+#include <ndn-cxx/util/sha256.hpp>
+#include <ndn-cxx/security/signature-sha256-with-rsa.hpp>
namespace repo {
@@ -160,7 +160,7 @@
Index::computeKeyLocatorHash(const KeyLocator& keyLocator)
{
const Block& block = keyLocator.wireEncode();
- ndn::ConstBufferPtr keyLocatorHash = ndn::crypto::computeSha256Digest(block.wire(), block.size());
+ ndn::ConstBufferPtr keyLocatorHash = ndn::util::Sha256::computeDigest(block.wire(), block.size());
return keyLocatorHash;
}
@@ -175,7 +175,7 @@
{
KeyLocator keyLocator = interest.getPublisherPublicKeyLocator();
const Block& block = keyLocator.wireEncode();
- hash = ndn::crypto::computeSha256Digest(block.wire(), block.size());
+ hash = ndn::util::Sha256::computeDigest(block.wire(), block.size());
}
if (isLeftmost)
diff --git a/src/storage/sqlite-storage.cpp b/src/storage/sqlite-storage.cpp
index 034ae66..3411dfb 100644
--- a/src/storage/sqlite-storage.cpp
+++ b/src/storage/sqlite-storage.cpp
@@ -1,5 +1,5 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
* Copyright (c) 2014-2017, Regents of the University of California.
*
* This file is part of NDN repo-ng (Next generation of NDN repository).
@@ -17,10 +17,11 @@
* repo-ng, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "../../build/src/config.hpp"
#include "sqlite-storage.hpp"
+#include "../../build/src/config.hpp"
#include "index.hpp"
-#include <ndn-cxx/util/crypto.hpp>
+
+#include <ndn-cxx/util/sha256.hpp>
#include <boost/filesystem.hpp>
#include <istream>
@@ -163,7 +164,7 @@
data.wireEncode().size(),0 ) == SQLITE_OK &&
sqlite3_bind_blob(insertStmt, 4,
(const void*)&(*entry.getKeyLocatorHash()),
- ndn::crypto::SHA256_DIGEST_SIZE,0) == SQLITE_OK) {
+ ndn::util::Sha256::DIGEST_SIZE, 0) == SQLITE_OK) {
rc = sqlite3_step(insertStmt);
if (rc == SQLITE_CONSTRAINT) {
std::cerr << "Insert failed" << std::endl;