diff options
author | Niels Möller <nisse@lysator.liu.se> | 2019-12-25 16:30:50 +0100 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2019-12-25 16:30:50 +0100 |
commit | f77bd0a33c255b4fd6cac4f8be4d1cde8da0980b (patch) | |
tree | 55208e3fbd427fe1a517720bbf1cee5262c2caee /sha3.c | |
parent | d4c3e2ee91ddd992ae155b9375e6bc25e98b22f1 (diff) | |
download | nettle-f77bd0a33c255b4fd6cac4f8be4d1cde8da0980b.tar.gz |
Generalize _sha3_pad to take magic value as argument.
Diffstat (limited to 'sha3.c')
-rw-r--r-- | sha3.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |