table: Offload the implicit digest calculation to the library

Change-Id: I8577ec3ee194d639cce74b53fb5f02c7e718cbc3
Refs: #1678
diff --git a/tests/test-common.hpp b/tests/test-common.hpp
index 6b67f2f..9c60c77 100644
--- a/tests/test-common.hpp
+++ b/tests/test-common.hpp
@@ -67,10 +67,8 @@
 }
 
 inline shared_ptr<Data>
-makeData(const Name& name)
+signData(const shared_ptr<Data>& data)
 {
-  shared_ptr<Data> data = make_shared<Data>(name);
-
   ndn::SignatureSha256WithRsa fakeSignature;
   fakeSignature.setValue(ndn::dataBlock(tlv::SignatureValue,
                                         reinterpret_cast<const uint8_t*>(0), 0));
@@ -80,6 +78,15 @@
   return data;
 }
 
+inline shared_ptr<Data>
+makeData(const Name& name)
+{
+  shared_ptr<Data> data = make_shared<Data>(name);
+
+  return signData(data);
+}
+
+
 } // namespace tests
 } // namespace nfd