From 6ee774a5933bbaa07711f62262511d46c8d0daf9 Mon Sep 17 00:00:00 2001 From: "Matthias J. Kannwischer" Date: Tue, 10 Sep 2019 11:27:37 +0200 Subject: [PATCH] fix incremental sha512 --- common/sha2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/sha2.c b/common/sha2.c index c7214345..99773a42 100644 --- a/common/sha2.c +++ b/common/sha2.c @@ -561,7 +561,7 @@ void sha224_inc_blocks(sha224ctx *state, const uint8_t *in, size_t inblocks) { void sha512_inc_blocks(sha512ctx *state, const uint8_t *in, size_t inblocks) { uint64_t bytes = load_bigendian_64(state->ctx + 64); - crypto_hashblocks_sha256(state->ctx, in, 128 * inblocks); + crypto_hashblocks_sha512(state->ctx, in, 128 * inblocks); bytes += 128 * inblocks; store_bigendian_64(state->ctx + 64, bytes);