Added sign which takes publicKeyDer and privateKeyDer
diff --git a/ndn-cpp/key-chain.hpp b/ndn-cpp/key-chain.hpp
index 97991e9..8de7a62 100644
--- a/ndn-cpp/key-chain.hpp
+++ b/ndn-cpp/key-chain.hpp
@@ -13,14 +13,25 @@
class KeyChain {
public:
/**
- * In data, set the signed info publisher public key digest and key locator key to the default public key and set the
- * signature using the default private key.
+ * In data, set the signed info publisher public key digest and key locator key to the public key and set the
+ * signature using the private key.
* Note: the caller must make sure the timestamp is correct, for example with
* data.getSignedInfo().setTimestampMilliseconds(time(NULL) * 1000.0).
- * @param data The Data object to sign and set the signature.
+ * @param data The Data object to sign and set the key and signature.
+ * @param publicKeyDer A pointer to a buffer with the DER-encoded public key.
+ * @param publicKeyDerLength The number of bytes in publicKeyDer.
+ * @param privateKeyDer A pointer to a buffer with the DER-encoded private key.
+ * @param privateKeyDerLength The number of bytes in privateKeyDer.
+ */
+ static void sign
+ (Data &data, const unsigned char *publicKeyDer, unsigned int publicKeyDerLength,
+ const unsigned char *privateKeyDer, unsigned int privateKeyDerLength);
+
+ /**
+ * Call sign with the default public and private keys.
+ * @param data
*/
static void defaultSign(Data &data);
-
};
}