diff --git a/tests/key-chain-fixture.cpp b/tests/key-chain-fixture.cpp
index 29a75b8..b416524 100644
--- a/tests/key-chain-fixture.cpp
+++ b/tests/key-chain-fixture.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020, Regents of the University of California
+ * Copyright (c) 2014-2022, 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
@@ -55,7 +55,7 @@
   cert.setFreshnessPeriod(1_h);
 
   // set content
-  cert.setContent(key.getPublicKey().data(), key.getPublicKey().size());
+  cert.setContent(key.getPublicKey());
 
   // set signature info
   ndn::SignatureInfo info;
diff --git a/tests/unit/access-manager.t.cpp b/tests/unit/access-manager.t.cpp
index d15249f..dbbae40 100644
--- a/tests/unit/access-manager.t.cpp
+++ b/tests/unit/access-manager.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020, Regents of the University of California
+ * Copyright (c) 2014-2022, 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
@@ -111,7 +111,7 @@
   std::cerr << "const Block nacIdentity = \"";
   auto block = m_keyChain.exportSafeBag(nacIdentity.getDefaultKey().getDefaultCertificate(),
                                         "password", strlen("password"))->wireEncode();
-  printHex(std::cerr, block.wire(), block.size(), true);
+  printHex(std::cerr, block, true);
   std::cerr << "\"_block;\n\n";
 
   std::cerr << "const std::vector<Block> userIdentities = {\n";
@@ -119,7 +119,7 @@
     std::cerr << "  \"";
     block = m_keyChain.exportSafeBag(userId.getDefaultKey().getDefaultCertificate(),
                                      "password", strlen("password"))->wireEncode();
-    printHex(std::cerr, block.wire(), block.size(), true);
+    printHex(std::cerr, block, true);
     std::cerr << "\"_block,\n";
   }
   std::cerr << "};\n\n";
@@ -127,7 +127,7 @@
   std::cerr << "const std::vector<Block> managerPackets = {\n";
   for (const auto& data : manager) {
     std::cerr << "  \"";
-    printHex(std::cerr, data.wireEncode().wire(), data.wireEncode().size(), true);
+    printHex(std::cerr, data.wireEncode(), true);
     std::cerr << "\"_block,\n";
   }
   std::cerr << "};\n\n";
diff --git a/tests/unit/encryptor.t.cpp b/tests/unit/encryptor.t.cpp
index 9439fcc..d9bafba 100644
--- a/tests/unit/encryptor.t.cpp
+++ b/tests/unit/encryptor.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2014-2020, Regents of the University of California
+ * Copyright (c) 2014-2022, 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
@@ -103,8 +103,8 @@
   encryptor.regenerateCk();
   BOOST_CHECK_EQUAL(encryptor.m_isKekRetrievalInProgress, true);
 
-  std::string plaintext = "Data to encrypt";
-  auto block = encryptor.encrypt(reinterpret_cast<const uint8_t*>(plaintext.data()), plaintext.size());
+  const std::string plaintext = "Data to encrypt";
+  auto block = encryptor.encrypt({reinterpret_cast<const uint8_t*>(plaintext.data()), plaintext.size()});
 
   EncryptedContent content(block);
   auto ckPrefix = content.getKeyLocator();
@@ -147,8 +147,8 @@
   size_t nErrors = 0;
   onFailure.connect([&] (auto&&...) { ++nErrors; });
 
-  std::string plaintext = "Data to encrypt";
-  auto block = encryptor.encrypt(reinterpret_cast<const uint8_t*>(plaintext.data()), plaintext.size());
+  const std::string plaintext = "Data to encrypt";
+  auto block = encryptor.encrypt({reinterpret_cast<const uint8_t*>(plaintext.data()), plaintext.size()});
   advanceClocks(1_ms, 10);
 
   // check that KEK interests has been sent
@@ -204,8 +204,8 @@
   std::cerr << "const std::vector<Block> encryptedBlobs = {\n";
   for (size_t i = 0; i < 3; ++i) {
     std::cerr << "  \"";
-    auto block = encryptor.encrypt(reinterpret_cast<const uint8_t*>(plaintext.data()), plaintext.size());
-    printHex(std::cerr, block.wireEncode().wire(), block.wireEncode().size(), true);
+    auto block = encryptor.encrypt({reinterpret_cast<const uint8_t*>(plaintext.data()), plaintext.size()});
+    printHex(std::cerr, block.wireEncode(), true);
     std::cerr << "\"_block,\n";
 
     encryptor.regenerateCk();
@@ -216,7 +216,7 @@
   std::cerr << "const std::vector<Block> encryptorPackets = {\n";
   for (const auto& data : encryptor) {
     std::cerr << "  \"";
-    printHex(std::cerr, data.wireEncode().wire(), data.wireEncode().size(), true);
+    printHex(std::cerr, data.wireEncode(), true);
     std::cerr << "\"_block,\n";
   }
   std::cerr << "};\n\n";
