aboutsummaryrefslogtreecommitdiffstats
path: root/libblake_blake2xb_init.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2022-02-20 11:29:39 +0100
committerMattias Andrée <maandree@kth.se>2022-02-20 11:29:39 +0100
commit4319d104ceb3ed1e62e7831b9f232c6b4186a7b4 (patch)
tree8cc9a6e6770d55f964631664defcd9baa542ff9a /libblake_blake2xb_init.c
parentAdd more tests for BLAKE2b and BLAKE2s and update init functions (breaks API; were broken for keyed mode with zero-length message) (diff)
downloadlibblake-4319d104ceb3ed1e62e7831b9f232c6b4186a7b4.tar.gz
libblake-4319d104ceb3ed1e62e7831b9f232c6b4186a7b4.tar.bz2
libblake-4319d104ceb3ed1e62e7831b9f232c6b4186a7b4.tar.xz
Update init for BLAKE2Xb and BLAKE2Xs according to previous commmit
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'libblake_blake2xb_init.c')
-rw-r--r--libblake_blake2xb_init.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/libblake_blake2xb_init.c b/libblake_blake2xb_init.c
index 1064bae..da59755 100644
--- a/libblake_blake2xb_init.c
+++ b/libblake_blake2xb_init.c
@@ -2,11 +2,12 @@
#include "common.h"
void
-libblake_blake2xb_init(struct libblake_blake2xb_state *state, const struct libblake_blake2xb_params *params, const unsigned char *key)
+libblake_blake2xb_init(struct libblake_blake2xb_state *state, const struct libblake_blake2xb_params *params)
{
libblake_internal_blake2xb_init0(state, params);
memcpy(&state->xof_params, params, sizeof(state->xof_params));
+ state->xof_params.digest_len = 64;
state->xof_params.key_len = 0;
state->xof_params.fanout = 0;
state->xof_params.depth = 0;
@@ -16,9 +17,4 @@ libblake_blake2xb_init(struct libblake_blake2xb_state *state, const struct libbl
state->xof_params.inner_len = 64;
memset(&state->intermediate, 0, sizeof(state->intermediate));
-
- if (params->key_len) {
- state->b2b.t[0] = 128;
- libblake_internal_blake2b_compress(&state->b2b, key);
- }
}