aboutsummaryrefslogtreecommitdiffstats
path: root/sum_fd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sum_fd.c')
-rw-r--r--sum_fd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sum_fd.c b/sum_fd.c
index 35d4121..888e423 100644
--- a/sum_fd.c
+++ b/sum_fd.c
@@ -37,10 +37,9 @@ libsha2_sum_fd(int fd, enum libsha2_algorithm algorithm, char *restrict hashsum)
continue;
return -1;
}
- libsha2_update(&state, chunk, (size_t)r);
+ libsha2_update(&state, chunk, (size_t)r * 8);
}
libsha2_digest(&state, NULL, 0, hashsum);
return 0;
}
-