Commit 9dc0ba60 authored by Niels Möller's avatar Niels Möller
Browse files

Removed calls of md5_final.

Rev: src/rsync/generate.c:1.6
Rev: src/rsync/receive.c:1.6
Rev: src/rsync/send.c:1.8
parent f6a9804c
......@@ -24,7 +24,6 @@ rsync_end_block(struct rsync_generate_state *s,
{
WRITE_UINT16(dst, s->a_sum);
WRITE_UINT16(dst + 2, s->c_sum);
md5_final(&s->block_sum);
md5_digest(&s->block_sum, MD5_DIGEST_SIZE, dst + 4);
}
......
......@@ -122,7 +122,6 @@ rsync_receive(struct rsync_receive_state *s)
do_checksum:
/* i is number of octets read */
s->i = 0;
md5_final(&s->sum_md5);
md5_digest(&s->sum_md5, MD5_DIGEST_SIZE, s->buf);
s->state = RSYNC_READ_CHECKSUM;
case RSYNC_READ_CHECKSUM:
......
......@@ -131,7 +131,6 @@ rsync_lookup_block(struct rsync_send_state *s,
{
md5_init(&m);
md5_update(&m, s->table->block_size, s->buf + start);
md5_final(&m);
md5_digest(&m, MD5_DIGEST_SIZE, digest);
if (!memcmp(s->guess->sum_md5, digest, RSYNC_SUM_SIZE))
......@@ -149,7 +148,6 @@ rsync_lookup_block(struct rsync_send_state *s,
{
md5_init(&m);
md5_update(&m, s->table->block_size, s->buf + start);
md5_final(&m);
md5_digest(&m, MD5_DIGEST_SIZE, digest);
n = rsync_lookup_2(n, weak, digest);
......@@ -183,7 +181,6 @@ rsync_lookup_block(struct rsync_send_state *s,
md5_init(&m);
md5_update(&m, size, s->buf + start);
md5_final(&m);
md5_digest(&m, MD5_DIGEST_SIZE, digest);
if (!memcmp(n->sum_md5, digest, RSYNC_SUM_SIZE))
......@@ -340,7 +337,6 @@ rsync_send_eof(struct rsync_send_state *s)
end += 4;
/* And final hash of the entire file */
md5_final(&s->sum_md5);
md5_digest(&s->sum_md5, MD5_DIGEST_SIZE, s->buf + end);
end += RSYNC_SUM_SIZE;
......@@ -450,7 +446,6 @@ rsync_send_search(struct rsync_send_state *s)
s->table->block_size - done,
BUF + start);
md5_update(&m, done, s->next_in);
md5_final(&m);
md5_digest(&m, MD5_DIGEST_SIZE, digest);
n = rsync_lookup_2(n, weak, 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