Convert to span and avoid deprecated ndn-cxx functions

Change-Id: I45c50527fe53498b53a3d951458bdff8e7d7778c
diff --git a/tools/ndn-autoconfig-server/program.cpp b/tools/ndn-autoconfig-server/program.cpp
index 21e7857..82c1497 100644
--- a/tools/ndn-autoconfig-server/program.cpp
+++ b/tools/ndn-autoconfig-server/program.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2021,  Regents of the University of California,
+ * Copyright (c) 2014-2022,  Regents of the University of California,
  *                           Arizona Board of Regents,
  *                           Colorado State University,
  *                           University Pierre & Marie Curie, Sorbonne University,
@@ -53,12 +53,9 @@
 void
 Program::enableHubData(const FaceUri& hubFaceUri)
 {
-  std::string uri = hubFaceUri.toString();
-
   auto data = make_shared<Data>(Name(HUB_DATA_NAME).appendVersion());
   data->setFreshnessPeriod(1_h);
-  data->setContent(makeBinaryBlock(tlv::nfd::Uri,
-                                   reinterpret_cast<const uint8_t*>(uri.data()), uri.size()));
+  data->setContent(makeStringBlock(tlv::nfd::Uri, hubFaceUri.toString()));
   m_keyChain.sign(*data);
 
   m_face.setInterestFilter(HUB_DATA_NAME,