diff --git a/include/ndn-cpp/publisher-public-key-digest.hpp b/include/ndn-cpp/publisher-public-key-digest.hpp
index ad60ef4..289e682 100644
--- a/include/ndn-cpp/publisher-public-key-digest.hpp
+++ b/include/ndn-cpp/publisher-public-key-digest.hpp
@@ -44,33 +44,7 @@
   getPublisherPublicKeyDigest() const { return publisherPublicKeyDigest_; }
 
   void 
-  setPublisherPublicKeyDigest(const std::vector<uint8_t>& publisherPublicKeyDigest) 
-  { 
-    publisherPublicKeyDigest_ = publisherPublicKeyDigest; 
-  }
-  
-  void 
-  setPublisherPublicKeyDigest(const uint8_t *publisherPublicKeyDigest, size_t publisherPublicKeyDigestLength) 
-  { 
-    publisherPublicKeyDigest_ = Blob(publisherPublicKeyDigest, publisherPublicKeyDigestLength); 
-  }
-
-  /**
-   * Set the publisher public key digest to point to an existing byte array.  IMPORTANT: After calling this,
-   * if you keep a pointer to the array then you must treat the array as immutable and promise not to change it.
-   * @param signature A pointer to a vector with the byte array.  This takes another reference and does not copy the bytes.
-   */
-  void 
-  setPublisherPublicKeyDigest(const ptr_lib::shared_ptr<std::vector<uint8_t> > &publisherPublicKeyDigest) 
-  { 
-    publisherPublicKeyDigest_ = publisherPublicKeyDigest; 
-  }
-
-  void 
-  setPublisherPublicKeyDigest(const ptr_lib::shared_ptr<const std::vector<uint8_t> > &publisherPublicKeyDigest) 
-  { 
-    publisherPublicKeyDigest_ = publisherPublicKeyDigest; 
-  }
+  setPublisherPublicKeyDigest(const Blob& publisherPublicKeyDigest) { publisherPublicKeyDigest_ = publisherPublicKeyDigest; }
   
   /**
    * Clear the publisherPublicKeyDigest.
diff --git a/src/node.cpp b/src/node.cpp
index a31144c..7ad328c 100644
--- a/src/node.cpp
+++ b/src/node.cpp
@@ -87,9 +87,9 @@
   // Set the public key.
   uint8_t publicKeyDigest[SHA256_DIGEST_LENGTH];
   ndn_digestSha256(SELFREG_PUBLIC_KEY_DER, sizeof(SELFREG_PUBLIC_KEY_DER), publicKeyDigest);
-  signature->getPublisherPublicKeyDigest().setPublisherPublicKeyDigest(publicKeyDigest, sizeof(publicKeyDigest));
+  signature->getPublisherPublicKeyDigest().setPublisherPublicKeyDigest(Blob(publicKeyDigest, sizeof(publicKeyDigest)));
   signature->getKeyLocator().setType(ndn_KeyLocatorType_KEY);
-  signature->getKeyLocator().setKeyData(SELFREG_PUBLIC_KEY_DER, sizeof(SELFREG_PUBLIC_KEY_DER));
+  signature->getKeyLocator().setKeyData(Blob(SELFREG_PUBLIC_KEY_DER, sizeof(SELFREG_PUBLIC_KEY_DER)));
 
   // Sign the fields.
   SignedBlob encoding = data.wireEncode(wireFormat);
