]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
Removed calls of sha256_final and and some calls of
authorNiels Möller <nisse@lysator.liu.se>
Wed, 9 Jan 2002 15:00:14 +0000 (16:00 +0100)
committerNiels Möller <nisse@lysator.liu.se>
Wed, 9 Jan 2002 15:00:14 +0000 (16:00 +0100)
sha256_init.

Rev: src/nettle/yarrow256.c:1.15

yarrow256.c

index ad6c3b5604961686435295308d9e41533b248c8f..4910049aa77eabfb04c064c1ff455fe3ce6755ad 100644 (file)
@@ -162,7 +162,6 @@ yarrow_iterate(uint8_t *digest)
       sha256_update(&hash, sizeof(v0), v0);
       sha256_update(&hash, sizeof(count), count);
 
-      sha256_final(&hash);
       sha256_digest(&hash, SHA256_DIGEST_SIZE, digest);
     }
 }
@@ -191,9 +190,7 @@ yarrow_fast_reseed(struct yarrow256_ctx *ctx)
       sha256_update(&ctx->pools[YARROW_FAST], sizeof(blocks), blocks);
     }
   
-  sha256_final(&ctx->pools[YARROW_FAST]);
   sha256_digest(&ctx->pools[YARROW_FAST], sizeof(digest), digest);
-  sha256_init(&ctx->pools[YARROW_FAST]);
 
   /* Iterate */
   yarrow_iterate(digest);
@@ -228,9 +225,7 @@ yarrow_slow_reseed(struct yarrow256_ctx *ctx)
 
   /* Get digest of the slow pool*/
   
-  sha256_final(&ctx->pools[YARROW_SLOW]);
   sha256_digest(&ctx->pools[YARROW_SLOW], sizeof(digest), digest);
-  sha256_init(&ctx->pools[YARROW_SLOW]);
 
   /* Feed it into the fast pool */
   sha256_update(&ctx->pools[YARROW_FAST], sizeof(digest), digest);