diff options
author | Christian Grothoff <christian@grothoff.org> | 2009-09-07 11:58:04 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2009-09-07 11:58:04 +0000 |
commit | 9dac7b6b7b035d55bdb9731795712ead92e11f76 (patch) | |
tree | 8bed4ad4617f95bcdaac75dc43c2b2dd461b3e76 /src/util/crypto_hash.c | |
parent | 2a534fc5efadca1b65648efb903c3b4c17ac33ad (diff) | |
download | gnunet-9dac7b6b7b035d55bdb9731795712ead92e11f76.tar.gz gnunet-9dac7b6b7b035d55bdb9731795712ead92e11f76.zip |
fixes
Diffstat (limited to 'src/util/crypto_hash.c')
-rw-r--r-- | src/util/crypto_hash.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/util/crypto_hash.c b/src/util/crypto_hash.c index 45e599bcf..bc15113c6 100644 --- a/src/util/crypto_hash.c +++ b/src/util/crypto_hash.c | |||
@@ -214,10 +214,6 @@ sha512_transform (unsigned long long *state, const unsigned char *input) | |||
214 | state[5] += f; | 214 | state[5] += f; |
215 | state[6] += g; | 215 | state[6] += g; |
216 | state[7] += h; | 216 | state[7] += h; |
217 | |||
218 | /* erase our data */ | ||
219 | a = b = c = d = e = f = g = h = t1 = t2 = 0; | ||
220 | memset (W, 0, 80 * sizeof (unsigned long long)); | ||
221 | } | 217 | } |
222 | 218 | ||
223 | static void | 219 | static void |
@@ -281,13 +277,13 @@ sha512_final (struct sha512_ctx *sctx, unsigned char *hash) | |||
281 | static unsigned char padding[128] = { 0x80, }; | 277 | static unsigned char padding[128] = { 0x80, }; |
282 | 278 | ||
283 | unsigned int t; | 279 | unsigned int t; |
284 | unsigned long long t2; | ||
285 | unsigned char bits[128]; | 280 | unsigned char bits[128]; |
286 | unsigned int index, pad_len; | 281 | unsigned int index; |
282 | unsigned int pad_len; | ||
283 | unsigned long long t2; | ||
287 | int i, j; | 284 | int i, j; |
288 | 285 | ||
289 | index = pad_len = t = i = j = 0; | 286 | t = i = j = 0; |
290 | t2 = 0; | ||
291 | 287 | ||
292 | /* Save number of bits */ | 288 | /* Save number of bits */ |
293 | t = sctx->count[0]; | 289 | t = sctx->count[0]; |