summaryrefslogtreecommitdiff
path: root/sha3.c
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2019-12-25 16:30:50 +0100
committerNiels Möller <nisse@lysator.liu.se>2019-12-25 16:30:50 +0100
commitf77bd0a33c255b4fd6cac4f8be4d1cde8da0980b (patch)
tree55208e3fbd427fe1a517720bbf1cee5262c2caee /sha3.c
parentd4c3e2ee91ddd992ae155b9375e6bc25e98b22f1 (diff)
downloadnettle-f77bd0a33c255b4fd6cac4f8be4d1cde8da0980b.tar.gz
Generalize _sha3_pad to take magic value as argument.
Diffstat (limited to 'sha3.c')
-rw-r--r--sha3.c4
1 files changed, 2 insertions, 2 deletions
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;