From e08dff210507b3a56e8aa1cd14d653ecfb3228f9 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 6 Sep 2024 20:00:21 +0200 Subject: Add hash_excess_bits MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libhashsum_init_keccak__.c | 1 + 1 file changed, 1 insertion(+) (limited to 'libhashsum_init_keccak__.c') diff --git a/libhashsum_init_keccak__.c b/libhashsum_init_keccak__.c index 6e1abf7..f9c8be1 100644 --- a/libhashsum_init_keccak__.c +++ b/libhashsum_init_keccak__.c @@ -151,6 +151,7 @@ libhashsum_init_keccak__(struct libhashsum_hasher *this, size_t hashbits, void * this->supports_non_whole_bytes = 1; this->standard_partial_byte_input_encoding = LIBHASHSUM_LEAST_SIGNIFICANT; this->standard_partial_byte_output_encoding = LIBHASHSUM_LEAST_SIGNIFICANT; + this->hash_excess_bits = (8U - (hashbits & 7U)) & 7U; this->state.keccak.squeezes = squeezes; this->state.keccak.suffix = suffix; -- cgit v1.2.3-70-g09d2