data: Optimize Data signing
As of this commit, KeyChain::sign pre-allocates EncodingBuffer, requests
unsigned portion of Data using Data::wireEncode(EncodingBuffer, true),
and then appends the resulting signature and prepends Data packet
header. This way there is no extra memory allocation after Data packet
is signed.
Change-Id: I670e9a2f1d6f5e9b049f41b47f011af384f32c95
diff --git a/src/util/crypto.hpp b/src/util/crypto.hpp
index 43933b4..dc0a754 100644
--- a/src/util/crypto.hpp
+++ b/src/util/crypto.hpp
@@ -34,7 +34,8 @@
* @param dataLength The length of data.
* @param digest A pointer to a buffer of size crypto::SHA256_DIGEST_SIZE to receive the data.
*/
-void ndn_digestSha256(const uint8_t* data, size_t dataLength, uint8_t* digest);
+void
+ndn_digestSha256(const uint8_t* data, size_t dataLength, uint8_t* digest);
namespace crypto {