Internal: Use C struct ndn_Blob where possible. Make ndn::Blob work with ndn_Blob.
diff --git a/ndn-cpp/publisher-public-key-digest.hpp b/ndn-cpp/publisher-public-key-digest.hpp
index 1c04b3a..8069fa0 100644
--- a/ndn-cpp/publisher-public-key-digest.hpp
+++ b/ndn-cpp/publisher-public-key-digest.hpp
@@ -30,11 +30,7 @@
void
get(struct ndn_PublisherPublicKeyDigest& publisherPublicKeyDigestStruct) const
{
- publisherPublicKeyDigestStruct.publisherPublicKeyDigestLength = publisherPublicKeyDigest_.size();
- if (publisherPublicKeyDigest_.size() > 0)
- publisherPublicKeyDigestStruct.publisherPublicKeyDigest = (uint8_t *)publisherPublicKeyDigest_.buf();
- else
- publisherPublicKeyDigestStruct.publisherPublicKeyDigest = 0;
+ publisherPublicKeyDigest_.get(publisherPublicKeyDigestStruct.publisherPublicKeyDigest);
}
/**
@@ -44,8 +40,7 @@
void
set(const struct ndn_PublisherPublicKeyDigest& publisherPublicKeyDigestStruct)
{
- publisherPublicKeyDigest_ =
- Blob(publisherPublicKeyDigestStruct.publisherPublicKeyDigest, publisherPublicKeyDigestStruct.publisherPublicKeyDigestLength);
+ publisherPublicKeyDigest_ = Blob(publisherPublicKeyDigestStruct.publisherPublicKeyDigest);
}
const Blob&