1
1
mirror of https://github.com/BLAKE2/BLAKE2 synced 2024-09-16 08:31:34 +02:00

missing adjustments

This commit is contained in:
Samuel Neves 2016-10-11 22:03:29 +01:00
parent 8b6442c3af
commit cb19577245
2 changed files with 6 additions and 2 deletions

View File

@ -36,6 +36,7 @@ static int blake2bp_init_leaf( blake2b_state *S, size_t outlen, size_t keylen, u
P->depth = 2;
P->leaf_length = 0;
P->node_offset = offset;
P->xof_length = 0;
P->node_depth = 0;
P->inner_length = BLAKE2B_OUTBYTES;
memset( P->reserved, 0, sizeof( P->reserved ) );
@ -53,6 +54,7 @@ static int blake2bp_init_root( blake2b_state *S, size_t outlen, size_t keylen )
P->depth = 2;
P->leaf_length = 0;
P->node_offset = 0;
P->xof_length = 0;
P->node_depth = 1;
P->inner_length = BLAKE2B_OUTBYTES;
memset( P->reserved, 0, sizeof( P->reserved ) );

View File

@ -34,7 +34,8 @@ static int blake2sp_init_leaf( blake2s_state *S, size_t outlen, size_t keylen, u
P->fanout = PARALLELISM_DEGREE;
P->depth = 2;
P->leaf_length = 0;
store48( P->node_offset, offset );
P->node_offset = offset;
P->xof_length = 0;
P->node_depth = 0;
P->inner_length = BLAKE2S_OUTBYTES;
memset( P->salt, 0, sizeof( P->salt ) );
@ -50,7 +51,8 @@ static int blake2sp_init_root( blake2s_state *S, size_t outlen, size_t keylen )
P->fanout = PARALLELISM_DEGREE;
P->depth = 2;
P->leaf_length = 0;
store48( P->node_offset, 0ULL );
P->node_offset = 0;
P->xof_length = 0;
P->node_depth = 1;
P->inner_length = BLAKE2S_OUTBYTES;
memset( P->salt, 0, sizeof( P->salt ) );