summaryrefslogtreecommitdiff
path: root/src/libstdcrypto/sha1_final.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstdcrypto/sha1_final.c')
-rw-r--r--src/libstdcrypto/sha1_final.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libstdcrypto/sha1_final.c b/src/libstdcrypto/sha1_final.c
index d29a621..7205ed3 100644
--- a/src/libstdcrypto/sha1_final.c
+++ b/src/libstdcrypto/sha1_final.c
@@ -7,12 +7,11 @@
void sha1_final (SHA1Schedule *ctx, char *digest)
{
char pack[8] ;
- unsigned int i = 0 ;
uint32_pack_big(pack, ctx->bits[1]) ;
uint32_pack_big(pack+4, ctx->bits[0]) ;
sha1_feed(ctx, 0x80) ;
while (ctx->b != 56) sha1_feed(ctx, 0) ;
sha1_update(ctx, pack, 8) ;
- for (; i < 5 ; i++)
+ for (unsigned int i = 0 ; i < 5 ; i++)
uint32_pack_big(digest + (i<<2), ctx->buf[i]) ;
}