Commit 75f5e9a4 authored by Niels Möller's avatar Niels Möller
Browse files

* src/dsa.c (dsa_hash): Don't call sha1_final.

* src/dsa_keygen.c (hash): Likewise.

Rev: src/dsa.c:1.32
Rev: src/dsa_keygen.c:1.20
parent 3b6b4717
...@@ -93,7 +93,6 @@ dsa_hash(mpz_t h, UINT32 length, const UINT8 *msg) ...@@ -93,7 +93,6 @@ dsa_hash(mpz_t h, UINT32 length, const UINT8 *msg)
struct sha1_ctx ctx; struct sha1_ctx ctx;
sha1_init(&ctx); sha1_init(&ctx);
sha1_update(&ctx, length, msg); sha1_update(&ctx, length, msg);
sha1_final(&ctx);
sha1_digest(&ctx, SHA1_DIGEST_SIZE, digest); sha1_digest(&ctx, SHA1_DIGEST_SIZE, digest);
bignum_parse_u(h, SHA1_DIGEST_SIZE, digest); bignum_parse_u(h, SHA1_DIGEST_SIZE, digest);
......
...@@ -61,7 +61,6 @@ hash(mpz_t x, UINT8 *digest) ...@@ -61,7 +61,6 @@ hash(mpz_t x, UINT8 *digest)
sha1_init(&ctx); sha1_init(&ctx);
sha1_update(&ctx, SEED_LENGTH, data); sha1_update(&ctx, SEED_LENGTH, data);
sha1_final(&ctx);
sha1_digest(&ctx, SHA1_DIGEST_SIZE, digest); sha1_digest(&ctx, SHA1_DIGEST_SIZE, digest);
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment