Added separate PublishPublicKeyDigest and use in Interest.
diff --git a/ndn-cpp/c/encoding/BinaryXMLPublisherPublicKeyDigest.c b/ndn-cpp/c/encoding/BinaryXMLPublisherPublicKeyDigest.c
new file mode 100644
index 0000000..b1ee3f8
--- /dev/null
+++ b/ndn-cpp/c/encoding/BinaryXMLPublisherPublicKeyDigest.c
@@ -0,0 +1,35 @@
+/**
+ * @author: Jeff Thompson
+ * Derived from PublisherPublicKeyDigest.js by Meki Cheraoui.
+ * See COPYING for copyright and distribution information.
+ */
+
+#include "BinaryXML.h"
+#include "BinaryXMLPublisherPublicKeyDigest.h"
+
+ndn_Error ndn_encodeBinaryXMLPublisherPublicKeyDigest
+ (struct ndn_PublisherPublicKeyDigest *publisherPublicKeyDigest, struct ndn_BinaryXMLEncoder *encoder)
+{
+ if (!publisherPublicKeyDigest->publisherPublicKeyDigest || publisherPublicKeyDigest->publisherPublicKeyDigestLength == 0)
+ return;
+
+ ndn_Error error;
+ if (error = ndn_BinaryXMLEncoder_writeBlobDTagElement
+ (encoder, ndn_BinaryXML_DTag_PublisherPublicKeyDigest, publisherPublicKeyDigest->publisherPublicKeyDigest,
+ publisherPublicKeyDigest->publisherPublicKeyDigestLength))
+ return error;
+
+ return 0;
+}
+
+ndn_Error ndn_decodeBinaryXMLPublisherPublicKeyDigest
+ (struct ndn_PublisherPublicKeyDigest *publisherPublicKeyDigest, struct ndn_BinaryXMLDecoder *decoder)
+{
+ ndn_Error error;
+ if (error = ndn_BinaryXMLDecoder_readBinaryDTagElement
+ (decoder, ndn_BinaryXML_DTag_PublisherPublicKeyDigest, 0, &publisherPublicKeyDigest->publisherPublicKeyDigest,
+ &publisherPublicKeyDigest->publisherPublicKeyDigestLength))
+ return error;
+
+ return 0;
+}