From 312a92b5104fd5e9090bc079f458f9105a91e1ea Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 8 Jul 2022 13:23:00 +0200 Subject: Use SHA extensions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- digest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'digest.c') diff --git a/digest.c b/digest.c index a60da1c..2a611d6 100644 --- a/digest.c +++ b/digest.c @@ -29,7 +29,7 @@ libsha2_digest(struct libsha2_state *restrict state, const void *message_, size_ if (off > state->chunk_size - (size_t)8 * (size_t)(1 + (state->algorithm > LIBSHA2_256))) { memset(state->chunk + off, 0, state->chunk_size - off); off = 0; - libsha2_process(state, state->chunk); + libsha2_process(state, state->chunk, state->chunk_size); } memset(state->chunk + off, 0, state->chunk_size - 8 - off); @@ -41,7 +41,7 @@ libsha2_digest(struct libsha2_state *restrict state, const void *message_, size_ state->chunk[state->chunk_size - 3] = (unsigned char)(state->message_size >> 16); state->chunk[state->chunk_size - 2] = (unsigned char)(state->message_size >> 8); state->chunk[state->chunk_size - 1] = (unsigned char)(state->message_size >> 0); - libsha2_process(state, state->chunk); + libsha2_process(state, state->chunk, state->chunk_size); n = libsha2_algorithm_output_size(state->algorithm); if (state->algorithm <= LIBSHA2_256) { -- cgit v1.2.3-70-g09d2