From f77bd0a33c255b4fd6cac4f8be4d1cde8da0980b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20M=C3=B6ller?= Date: Wed, 25 Dec 2019 16:30:50 +0100 Subject: Generalize _sha3_pad to take magic value as argument. --- sha3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sha3.c') diff --git a/sha3.c b/sha3.c index 4a083be2..43a911f9 100644 --- a/sha3.c +++ b/sha3.c @@ -92,10 +92,10 @@ _sha3_update (struct sha3_state *state, void _sha3_pad (struct sha3_state *state, - unsigned block_size, uint8_t *block, unsigned pos) + unsigned block_size, uint8_t *block, unsigned pos, uint8_t magic) { assert (pos < block_size); - block[pos++] = 6; + block[pos++] = magic; memset (block + pos, 0, block_size - pos); block[block_size - 1] |= 0x80; -- cgit v1.2.1