state[5] += f;
state[6] += g;
state[7] += h;
-
- /* erase our data */
- a = b = c = d = e = f = g = h = t1 = t2 = 0;
- memset (W, 0, 80 * sizeof (unsigned long long));
}
static void
static unsigned char padding[128] = { 0x80, };
unsigned int t;
- unsigned long long t2;
unsigned char bits[128];
- unsigned int index, pad_len;
+ unsigned int index;
+ unsigned int pad_len;
+ unsigned long long t2;
int i, j;
- index = pad_len = t = i = j = 0;
- t2 = 0;
+ i = j = 0;
/* Save number of bits */
t = sctx->count[0];
memset (sctx, 0, sizeof (struct sha512_ctx));
}
+
/**
* Hash block of given size.
*
GNUNET_HashCode * ret)
{
struct sha512_ctx ctx;
-
+
sha512_init (&ctx);
sha512_update (&ctx, block, size);
sha512_final (&ctx, (unsigned char *) ret);
/**
* Size of the file.
*/
- unsigned long long fsize;
+ uint64_t fsize;
/**
* Current offset.
*/
- unsigned long long offset;
-
+ uint64_t offset;
+
/**
* Run on shutdown?
*/