From a8a2cc1a28858e6045cbb367f68e9ca195a16521 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 5 Sep 2024 18:27:37 +0200 Subject: Set standard_partial_byte_output_encoding to LIBHASHSUM_UNSUPPORTED for SHA-3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libhashsum_init_sha3_hasher.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libhashsum_init_sha3_hasher.c b/libhashsum_init_sha3_hasher.c index fc03114..aa24e70 100644 --- a/libhashsum_init_sha3_hasher.c +++ b/libhashsum_init_sha3_hasher.c @@ -7,6 +7,7 @@ int libhashsum_init_sha3_hasher(struct libhashsum_hasher *this, size_t hashbits) { struct libkeccak_spec spec; + int r; if (hashbits == 224U) { this->algorithm = LIBHASHSUM_SHA3_224; @@ -26,7 +27,9 @@ libhashsum_init_sha3_hasher(struct libhashsum_hasher *this, size_t hashbits) } libkeccak_spec_sha3(&spec, (long int)hashbits); - return libhashsum_init_keccak__(this, hashbits, &spec, 1U, LIBKECCAK_SHA3_SUFFIX); + r = libhashsum_init_keccak__(this, hashbits, &spec, 1U, LIBKECCAK_SHA3_SUFFIX); + this->standard_partial_byte_output_encoding = LIBHASHSUM_UNSUPPORTED; + return r; } -- cgit v1.2.3-70-g09d2