encoding: remove duplicate buf() and get() methods from Buffer class
Change-Id: If885d4199d6c9df9b9b46664c3641c9a14a77eab
diff --git a/src/util/sha256.cpp b/src/util/sha256.cpp
index 7aeea64..034d12e 100644
--- a/src/util/sha256.cpp
+++ b/src/util/sha256.cpp
@@ -82,14 +82,14 @@
}
// constant-time buffer comparison to mitigate timing attacks
- return CRYPTO_memcmp(lhs.get(), rhs.get(), lhs.size()) == 0;
+ return CRYPTO_memcmp(lhs.data(), rhs.data(), lhs.size()) == 0;
}
Sha256&
Sha256::operator<<(Sha256& src)
{
auto buf = src.computeDigest();
- update(buf->get(), buf->size());
+ update(buf->data(), buf->size());
return *this;
}
diff --git a/src/util/string-helper.cpp b/src/util/string-helper.cpp
index 7665afc..8be94d0 100644
--- a/src/util/string-helper.cpp
+++ b/src/util/string-helper.cpp
@@ -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).
@@ -60,7 +60,7 @@
void
printHex(std::ostream& os, const Buffer& buffer, bool wantUpperCase)
{
- return printHex(os, buffer.buf(), buffer.size(), wantUpperCase);
+ return printHex(os, buffer.data(), buffer.size(), wantUpperCase);
}
std::string
@@ -74,7 +74,7 @@
std::string
toHex(const Buffer& buffer, bool wantUpperCase)
{
- return toHex(buffer.buf(), buffer.size(), wantUpperCase);
+ return toHex(buffer.data(), buffer.size(), wantUpperCase);
}
int