diff options
author | Christian Grothoff <christian@grothoff.org> | 2009-09-08 07:27:51 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2009-09-08 07:27:51 +0000 |
commit | 7a476fa676b8aed1bcae2b261d1eecff644ca627 (patch) | |
tree | 977b75ab74e99a8c0c3d42b931f58eaef84dc476 /src | |
parent | 97ae3ebc7d3fe74c7a64b38be16e18a613b6d2c0 (diff) | |
download | gnunet-7a476fa676b8aed1bcae2b261d1eecff644ca627.tar.gz gnunet-7a476fa676b8aed1bcae2b261d1eecff644ca627.zip |
stuff
Diffstat (limited to 'src')
-rw-r--r-- | src/util/crypto_hash.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/util/crypto_hash.c b/src/util/crypto_hash.c index bc15113c6..0370d74fb 100644 --- a/src/util/crypto_hash.c +++ b/src/util/crypto_hash.c | |||
@@ -283,7 +283,7 @@ sha512_final (struct sha512_ctx *sctx, unsigned char *hash) | |||
283 | unsigned long long t2; | 283 | unsigned long long t2; |
284 | int i, j; | 284 | int i, j; |
285 | 285 | ||
286 | t = i = j = 0; | 286 | i = j = 0; |
287 | 287 | ||
288 | /* Save number of bits */ | 288 | /* Save number of bits */ |
289 | t = sctx->count[0]; | 289 | t = sctx->count[0]; |
@@ -352,6 +352,7 @@ sha512_final (struct sha512_ctx *sctx, unsigned char *hash) | |||
352 | memset (sctx, 0, sizeof (struct sha512_ctx)); | 352 | memset (sctx, 0, sizeof (struct sha512_ctx)); |
353 | } | 353 | } |
354 | 354 | ||
355 | |||
355 | /** | 356 | /** |
356 | * Hash block of given size. | 357 | * Hash block of given size. |
357 | * | 358 | * |
@@ -364,7 +365,7 @@ GNUNET_CRYPTO_hash (const void *block, unsigned int size, | |||
364 | GNUNET_HashCode * ret) | 365 | GNUNET_HashCode * ret) |
365 | { | 366 | { |
366 | struct sha512_ctx ctx; | 367 | struct sha512_ctx ctx; |
367 | 368 | ||
368 | sha512_init (&ctx); | 369 | sha512_init (&ctx); |
369 | sha512_update (&ctx, block, size); | 370 | sha512_update (&ctx, block, size); |
370 | sha512_final (&ctx, (unsigned char *) ret); | 371 | sha512_final (&ctx, (unsigned char *) ret); |