aboutsummaryrefslogtreecommitdiffstats
path: root/libhashsum_init_sha3_hasher.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2024-09-05 18:27:37 +0200
committerMattias Andrée <maandree@kth.se>2024-09-05 18:27:37 +0200
commita8a2cc1a28858e6045cbb367f68e9ca195a16521 (patch)
tree47115b36bf339e31f1dccac92c689683ef433637 /libhashsum_init_sha3_hasher.c
parentAdd standard_partial_byte_input_encoding and standard_partial_byte_output_encoding (diff)
downloadlibhashsum-a8a2cc1a28858e6045cbb367f68e9ca195a16521.tar.gz
libhashsum-a8a2cc1a28858e6045cbb367f68e9ca195a16521.tar.bz2
libhashsum-a8a2cc1a28858e6045cbb367f68e9ca195a16521.tar.xz
Set standard_partial_byte_output_encoding to LIBHASHSUM_UNSUPPORTED for SHA-3
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'libhashsum_init_sha3_hasher.c')
-rw-r--r--libhashsum_init_sha3_hasher.c5
1 files changed, 4 insertions, 1 deletions
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;
}