blob: 45425f2b6fb22db370adbc8eb6a8e2f36be99bdf [file] [log] [blame]
/**
* @author: Jeff Thompson
* See COPYING for copyright and distribution information.
*/
#include "common.hpp"
#include "Key.hpp"
using namespace std;
namespace ndn {
void KeyLocator::get(struct ndn_KeyLocator &keyLocatorStruct) const
{
keyLocatorStruct.type = type_;
keyLocatorStruct.keyOrCertificateLength = keyOrCertificate_.size();
if (keyOrCertificate_.size() > 0)
keyLocatorStruct.keyOrCertificate = (unsigned char *)&keyOrCertificate_[0];
else
keyLocatorStruct.keyOrCertificate = 0;
// TODO: Implement keyName.
}
void KeyLocator::set(const struct ndn_KeyLocator &keyLocatorStruct)
{
type_ = keyLocatorStruct.type;
setVector(keyOrCertificate_, keyLocatorStruct.keyOrCertificate, keyLocatorStruct.keyOrCertificateLength);
// TODO: Implement keyName.
}
}