Avoid using deprecated ndn-cxx functions
Change-Id: Ib0eea64ad07bc940c98e9aa150ca9fca297928af
diff --git a/src/encrypted-content.cpp b/src/encrypted-content.cpp
index f9738bd..20c9886 100644
--- a/src/encrypted-content.cpp
+++ b/src/encrypted-content.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
- * Copyright (c) 2014-2018, Regents of the University of California
+/*
+ * Copyright (c) 2014-2020, Regents of the University of California
*
* NAC 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
@@ -137,19 +137,19 @@
{
size_t totalLength = 0;
- if (!m_keyLocator.empty()) {
+ if (hasKeyLocator()) {
totalLength += m_keyLocator.wireEncode(block);
}
- if (!m_payloadKey.empty()) {
+ if (hasPayloadKey()) {
totalLength += block.prependBlock(m_payloadKey);
}
- if (!m_iv.empty()) {
+ if (hasIv()) {
totalLength += block.prependBlock(m_iv);
}
- if (!m_payload.empty()) {
+ if (m_payload.isValid()) {
totalLength += block.prependBlock(m_payload);
}
else {
@@ -223,7 +223,7 @@
bool
EncryptedContent::operator==(const EncryptedContent& rhs) const
{
- return (wireEncode() == rhs.wireEncode());
+ return wireEncode() == rhs.wireEncode();
}
} // namespace nac