diff --git a/ndn-cpp/data.hpp b/ndn-cpp/data.hpp
index 5bf1e60..7e954d2 100644
--- a/ndn-cpp/data.hpp
+++ b/ndn-cpp/data.hpp
@@ -6,6 +6,7 @@
 #ifndef NDN_DATA_HPP
 #define NDN_DATA_HPP
 
+#include "common.hpp"
 #include "name.hpp"
 #include "publisher-public-key-digest.hpp"
 #include "key.hpp"
@@ -33,7 +34,25 @@
   const std::vector<unsigned char> getWitness() const { return witness_; }
 
   const std::vector<unsigned char> getSignature() const { return signature_; }
-  
+
+  void setDigestAlgorithm(const std::vector<unsigned char> &digestAlgorithm) { digestAlgorithm_ = digestAlgorithm; }
+  void setDigestAlgorithm(const unsigned char *digestAlgorithm, unsigned int digestAlgorithmLength) 
+  { 
+    setVector(digestAlgorithm_, digestAlgorithm, digestAlgorithmLength); 
+  }
+
+  void setWitness(const std::vector<unsigned char> &witness) { witness_ = witness; }
+  void setWitness(const unsigned char *witness, unsigned int witnessLength) 
+  { 
+    setVector(witness_, witness, witnessLength); 
+  }
+
+  void setSignature(const std::vector<unsigned char> &signature) { signature_ = signature; }
+  void setSignature(const unsigned char *signature, unsigned int signatureLength) 
+  { 
+    setVector(signature_, signature, signatureLength); 
+  }
+
 private:
   std::vector<unsigned char> digestAlgorithm_; /**< if empty, the default is 2.16.840.1.101.3.4.2.1 (sha-256) */
   std::vector<unsigned char> witness_;
@@ -72,6 +91,24 @@
   const std::vector<unsigned char> getFinalBlockID() const { return finalBlockID_; }
   
   const KeyLocator &getKeyLocator() const { return keyLocator_; }
+
+  PublisherPublicKeyDigest &getPublisherPublicKeyDigest() { return publisherPublicKeyDigest_; }
+  void setPublisherPublicKeyDigest(const PublisherPublicKeyDigest &publisherPublicKeyDigest) { publisherPublicKeyDigest_ = publisherPublicKeyDigest; }
+  
+  void setTimestampMilliseconds(double timestampMilliseconds) { timestampMilliseconds_ = timestampMilliseconds; }
+  
+  void setType(int type) { type_ = type; }
+  
+  void setFreshnessSeconds(int freshnessSeconds) { freshnessSeconds_ = freshnessSeconds; }
+  
+  void setFinalBlockID(const std::vector<unsigned char> &finalBlockID) { finalBlockID_ = finalBlockID; }
+  void setFinalBlockID(const unsigned char *finalBlockID, unsigned int finalBlockIdLength) 
+  { 
+    setVector(finalBlockID_, finalBlockID, finalBlockIdLength); 
+  }
+  
+  KeyLocator &getKeyLocator() { return keyLocator_; }
+  void setKeyLocator(const KeyLocator &keyLocator) { keyLocator_ = keyLocator; }
   
 private:
   PublisherPublicKeyDigest publisherPublicKeyDigest_;
@@ -129,6 +166,21 @@
   const SignedInfo &getSignedInfo() const { return signedInfo_; }
   
   const std::vector<unsigned char> getContent() const { return content_; }
+
+  Signature &getSignature() { return signature_; }
+  void setSignature(const Signature &signature) { signature_ = signature; }
+  
+  Name &getName() { return name_; }
+  void setName(const Name &name) { name_ = name; }
+  
+  SignedInfo &getSignedInfo() { return signedInfo_; }
+  void setSignedInfo(const SignedInfo &signedInfo) { signedInfo_ = signedInfo; }
+
+  void setContent(const std::vector<unsigned char> &content) { content_ = content; }
+  void setContent(const unsigned char *content, unsigned int contentLength) 
+  { 
+    setVector(content_, content, contentLength); 
+  }
   
 private:
   Signature signature_;
diff --git a/ndn-cpp/key.hpp b/ndn-cpp/key.hpp
index fd9df2b..d137b60 100644
--- a/ndn-cpp/key.hpp
+++ b/ndn-cpp/key.hpp
@@ -35,7 +35,17 @@
   
   const std::vector<unsigned char> getKeyOrCertificate() const { return keyOrCertificate_; }
 
-  // TODO: Implement keyName.
+  // TODO: Implement getKeyName.
+
+  void setType(ndn_KeyLocatorType type) { type_ = type; }
+  
+  void setKeyOrCertificate(const std::vector<unsigned char> &keyOrCertificate) { keyOrCertificate_ = keyOrCertificate; }
+  void setKeyOrCertificate(const unsigned char *keyOrCertificate, unsigned int keyOrCertificateLength) 
+  { 
+    setVector(keyOrCertificate_, keyOrCertificate, keyOrCertificateLength); 
+  }
+
+  // TODO: Implement setKeyName.
 
 private:
   ndn_KeyLocatorType type_;
diff --git a/ndn-cpp/publisher-public-key-digest.hpp b/ndn-cpp/publisher-public-key-digest.hpp
index af3da01..92c36f5 100644
--- a/ndn-cpp/publisher-public-key-digest.hpp
+++ b/ndn-cpp/publisher-public-key-digest.hpp
@@ -47,6 +47,12 @@
 
   const std::vector<unsigned char> &getPublisherPublicKeyDigest() const { return publisherPublicKeyDigest_; }
 
+  void setPublisherPublicKeyDigest(const std::vector<unsigned char> &publisherPublicKeyDigest) { publisherPublicKeyDigest_ = publisherPublicKeyDigest; }
+  void setPublisherPublicKeyDigest(const unsigned char *publisherPublicKeyDigest, unsigned int publisherPublicKeyDigestLength) 
+  { 
+    setVector(publisherPublicKeyDigest_, publisherPublicKeyDigest, publisherPublicKeyDigestLength); 
+  }
+
 private:
 	std::vector<unsigned char> publisherPublicKeyDigest_;
 };
