Prevents warnings from gcc at higher warning levels.
Signed-off-by: Jon Griffiths <jon_p_griffiths@yahoo.com>
size_t bufsize = ctx->bytes % 64;
if (bufsize + len >= 64) {
- // Fill the buffer, and process it.
+ /* Fill the buffer, and process it. */
memcpy(ctx->buf.u8 + bufsize, data, 64 - bufsize);
ctx->bytes += 64 - bufsize;
data += 64 - bufsize;
}
while (len >= 64) {
- // Process full chunks directly from the source.
+ /* Process full chunks directly from the source. */
if (alignment_ok(data, sizeof(uint32_t)))
Transform(ctx->s, (const uint32_t *)data);
else {
}
if (len) {
- // Fill the buffer with what remains.
+ /* Fill the buffer with what remains. */
memcpy(ctx->buf.u8 + bufsize, data, len);
ctx->bytes += len;
}
#include <stdlib.h>
/* Uncomment this to use openssl's RIPEMD160 routines (and link with -lcrypto) */
-//#define CCAN_CRYPTO_RIPEMD160_USE_OPENSSL 1
+/*#define CCAN_CRYPTO_RIPEMD160_USE_OPENSSL 1*/
#ifdef CCAN_CRYPTO_RIPEMD160_USE_OPENSSL
#include <openssl/ripemd.h>
memset(&block, 0, sizeof(block));
sha256(&block.h, &n, sizeof(n));
block.u8[sizeof(block.h)] = 0x80;
- // Size is 256 bits
+ /* Size is 256 bits */
block.u8[sizeof(block)-2] = 1;
start = time_now();
size_t bufsize = ctx->bytes % 64;
if (bufsize + len >= 64) {
- // Fill the buffer, and process it.
+ /* Fill the buffer, and process it. */
memcpy(ctx->buf.u8 + bufsize, data, 64 - bufsize);
ctx->bytes += 64 - bufsize;
data += 64 - bufsize;
}
while (len >= 64) {
- // Process full chunks directly from the source.
+ /* Process full chunks directly from the source. */
if (alignment_ok(data, sizeof(uint32_t)))
Transform(ctx->s, (const uint32_t *)data);
else {
}
if (len) {
- // Fill the buffer with what remains.
+ /* Fill the buffer with what remains. */
memcpy(ctx->buf.u8 + bufsize, data, len);
ctx->bytes += len;
}
#include <stdlib.h>
/* Uncomment this to use openssl's SHA256 routines (and link with -lcrypto) */
-//#define CCAN_CRYPTO_SHA256_USE_OPENSSL 1
+/*#define CCAN_CRYPTO_SHA256_USE_OPENSSL 1*/
#ifdef CCAN_CRYPTO_SHA256_USE_OPENSSL
#include <openssl/sha.h>