diff options
author | JP Aumasson <jeanphilippe.aumasson@gmail.com> | 2016-10-11 15:54:09 +0300 |
---|---|---|
committer | JP Aumasson <jeanphilippe.aumasson@gmail.com> | 2016-10-11 15:54:09 +0300 |
commit | 97c8a0cd5595d281a9e968124172fc151b9bac14 (patch) | |
tree | 239c9cc128cac657fb29c47d8bab9ba73b76a44a /ref/blake2s-ref.c | |
parent | c314fb42d4bafa0577de5a7d04c944ad175819c1 (diff) |
adding xof_length for b2x support
Diffstat (limited to 'ref/blake2s-ref.c')
-rw-r--r-- | ref/blake2s-ref.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ref/blake2s-ref.c b/ref/blake2s-ref.c index b570fd9..cca1762 100644 --- a/ref/blake2s-ref.c +++ b/ref/blake2s-ref.c @@ -102,7 +102,8 @@ int blake2s_init( blake2s_state *S, size_t outlen ) P->fanout = 1; P->depth = 1; store32( &P->leaf_length, 0 ); - store48( &P->node_offset, 0 ); + store32( &P->node_offset, 0 ); + store16( &P->xof_length, 0 ); P->node_depth = 0; P->inner_length = 0; /* memset(P->reserved, 0, sizeof(P->reserved) ); */ @@ -124,7 +125,8 @@ int blake2s_init_key( blake2s_state *S, size_t outlen, const void *key, size_t k P->fanout = 1; P->depth = 1; store32( &P->leaf_length, 0 ); - store48( &P->node_offset, 0 ); + store32( &P->node_offset, 0 ); + store16( &P->xof_length, 0 ); P->node_depth = 0; P->inner_length = 0; /* memset(P->reserved, 0, sizeof(P->reserved) ); */ |