Make KeyLocator.keyData_ a Blob.
diff --git a/ndn-cpp/key.cpp b/ndn-cpp/key.cpp
index 6cdae60..bbd6877 100644
--- a/ndn-cpp/key.cpp
+++ b/ndn-cpp/key.cpp
@@ -16,7 +16,7 @@
   
   keyLocatorStruct.keyDataLength = keyData_.size();
   if (keyData_.size() > 0)
-    keyLocatorStruct.keyData = (unsigned char *)&keyData_[0];
+    keyLocatorStruct.keyData = (unsigned char *)keyData_.buf();
   else
     keyLocatorStruct.keyData = 0;
 
@@ -27,7 +27,7 @@
 void KeyLocator::set(const struct ndn_KeyLocator& keyLocatorStruct)
 {
   type_ = keyLocatorStruct.type;
-  setVector(keyData_, keyLocatorStruct.keyData, keyLocatorStruct.keyDataLength);
+  keyData_ = Blob(keyLocatorStruct.keyData, keyLocatorStruct.keyDataLength);
   if (keyLocatorStruct.type == ndn_KeyLocatorType_KEYNAME) {
     keyName_.set(keyLocatorStruct.keyName);
     keyNameType_ = keyLocatorStruct.keyNameType;