Code style: Put function return type on a line by itself.
diff --git a/ndn-cpp/security/identity/identity-manager.cpp b/ndn-cpp/security/identity/identity-manager.cpp
index 1d0639f..3955518 100644
--- a/ndn-cpp/security/identity/identity-manager.cpp
+++ b/ndn-cpp/security/identity/identity-manager.cpp
@@ -9,7 +9,8 @@
namespace ndn {
-void IdentityManager::signByCertificate(const Data &data, const Name &certificateName, WireFormat& wireFormat)
+void
+IdentityManager::signByCertificate(const Data &data, const Name &certificateName, WireFormat& wireFormat)
{
}
diff --git a/ndn-cpp/security/identity/identity-manager.hpp b/ndn-cpp/security/identity/identity-manager.hpp
index bb4bc00..86a35b6 100644
--- a/ndn-cpp/security/identity/identity-manager.hpp
+++ b/ndn-cpp/security/identity/identity-manager.hpp
@@ -22,7 +22,8 @@
* @param certificateName The Name identifying the certificate which identifies the signing key.
* @param wireFormat The WireFormat for calling encodeData, or WireFormat::getDefaultWireFormat() if omitted.
*/
- void signByCertificate(const Data& data, const Name& certificateName, WireFormat& wireFormat = *WireFormat::getDefaultWireFormat());
+ void
+ signByCertificate(const Data& data, const Name& certificateName, WireFormat& wireFormat = *WireFormat::getDefaultWireFormat());
};
}
diff --git a/ndn-cpp/security/key-chain.cpp b/ndn-cpp/security/key-chain.cpp
index 1a8d12b..da8108c 100644
--- a/ndn-cpp/security/key-chain.cpp
+++ b/ndn-cpp/security/key-chain.cpp
@@ -66,7 +66,8 @@
* @param data The Data object with the fields to digest.
* @param digest A pointer to a buffer of size SHA256_DIGEST_LENGTH to receive the data.
*/
-static void dataSignedPortionSha256(const Data& data, WireFormat& wireFormat, unsigned char *digest)
+static void
+dataSignedPortionSha256(const Data& data, WireFormat& wireFormat, unsigned char *digest)
{
unsigned int signedPortionBeginOffset, signedPortionEndOffset;
Blob encoding = wireFormat.encodeData(data, &signedPortionBeginOffset, &signedPortionEndOffset);
@@ -74,7 +75,8 @@
ndn_digestSha256(encoding.buf() + signedPortionBeginOffset, signedPortionEndOffset - signedPortionBeginOffset, digest);
}
-void KeyChain::sign
+void
+KeyChain::sign
(Data& data, const unsigned char *publicKeyDer, unsigned int publicKeyDerLength,
const unsigned char *privateKeyDer, unsigned int privateKeyDerLength, WireFormat& wireFormat)
{
@@ -108,12 +110,14 @@
signature->setSignature(signatureBits, signatureBitsLength);
}
-void KeyChain::defaultSign(Data& data, WireFormat& wireFormat)
+void
+KeyChain::defaultSign(Data& data, WireFormat& wireFormat)
{
sign(data, DEFAULT_PUBLIC_KEY_DER, sizeof(DEFAULT_PUBLIC_KEY_DER), DEFAULT_PRIVATE_KEY_DER, sizeof(DEFAULT_PRIVATE_KEY_DER), wireFormat);
}
-bool KeyChain::selfVerifyData(const unsigned char *input, unsigned int inputLength, WireFormat& wireFormat)
+bool
+KeyChain::selfVerifyData(const unsigned char *input, unsigned int inputLength, WireFormat& wireFormat)
{
// Decode the data packet and digest the data fields.
Data data;
diff --git a/ndn-cpp/security/key-chain.hpp b/ndn-cpp/security/key-chain.hpp
index 297e490..7cfa64e 100644
--- a/ndn-cpp/security/key-chain.hpp
+++ b/ndn-cpp/security/key-chain.hpp
@@ -25,7 +25,8 @@
* @param privateKeyDerLength The number of bytes in privateKeyDer.
* @param wireFormat The WireFormat for calling encodeData.
*/
- static void sign
+ static void
+ sign
(Data& data, const unsigned char *publicKeyDer, unsigned int publicKeyDerLength,
const unsigned char *privateKeyDer, unsigned int privateKeyDerLength, WireFormat& wireFormat);
@@ -34,7 +35,8 @@
* @param data
* @param wireFormat The WireFormat for calling encodeData, or WireFormat::getDefaultWireFormat() if omitted.
*/
- static void defaultSign(Data& data, WireFormat& wireFormat = *WireFormat::getDefaultWireFormat());
+ static void
+ defaultSign(Data& data, WireFormat& wireFormat = *WireFormat::getDefaultWireFormat());
/**
* Use the WireFormat to decode the input as a Data packet and use the public key in the key locator to
@@ -46,9 +48,11 @@
* @return true if the public key in the Data object verifies the object, false if not or if the Data object
* doesn't have a public key.
*/
- static bool selfVerifyData(const unsigned char *input, unsigned int inputLength, WireFormat& wireFormat);
+ static bool
+ selfVerifyData(const unsigned char *input, unsigned int inputLength, WireFormat& wireFormat);
- static bool selfVerifyData(const unsigned char *input, unsigned int inputLength)
+ static bool
+ selfVerifyData(const unsigned char *input, unsigned int inputLength)
{
return selfVerifyData(input, inputLength, *WireFormat::getDefaultWireFormat());
}