Avoid deprecated ndn-cxx functions

Change-Id: Idcef8a642affb276581397e869d19534ec776240
diff --git a/src/detail/challenge-encoder.cpp b/src/detail/challenge-encoder.cpp
index c2bdd68..1a7a83d 100644
--- a/src/detail/challenge-encoder.cpp
+++ b/src/detail/challenge-encoder.cpp
@@ -36,7 +36,7 @@
     if (request.challengeState->challengeStatus == "need-proof") {
       response.push_back(ndn::makeStringBlock(tlv::ParameterKey, "nonce"));
       auto nonce = ndn::fromHex(request.challengeState->secrets.get("nonce", ""));
-      response.push_back(ndn::makeBinaryBlock(tlv::ParameterValue, nonce->data(), 16));
+      response.push_back(ndn::makeBinaryBlock(tlv::ParameterValue, *nonce));
     }
   }
   if (!issuedCertName.empty()) {
@@ -57,7 +57,7 @@
   auto result = decodeBlockWithAesGcm128(contentBlock, state.m_aesKey.data(),
                                          state.m_requestId.data(), state.m_requestId.size(),
                                          state.m_decryptionIv, state.m_encryptionIv);
-  auto data = ndn::makeBinaryBlock(tlv::EncryptedPayload, result.data(), result.size());
+  auto data = ndn::makeBinaryBlock(tlv::EncryptedPayload, result);
   data.parse();
 
   int numStatus = 0;