| 26 | #define PARALLELISM_DEGREE 4 |
| 27 | |
| 28 | static int blake2bp_init_leaf( blake2b_state *S, uint8_t outlen, uint8_t keylen, uint64_t offset ) |
| 29 | { |
| 30 | blake2b_param P[1]; |
| 31 | P->digest_length = outlen; |
| 32 | P->key_length = keylen; |
| 33 | P->fanout = PARALLELISM_DEGREE; |
| 34 | P->depth = 2; |
| 35 | store32(&P->leaf_length, 0); |
| 36 | store64(&P->node_offset, offset); |
| 37 | P->node_depth = 0; |
| 38 | P->inner_length = BLAKE2B_OUTBYTES; |
| 39 | memset( P->reserved, 0, sizeof( P->reserved ) ); |
| 40 | memset( P->salt, 0, sizeof( P->salt ) ); |
| 41 | memset( P->personal, 0, sizeof( P->personal ) ); |
| 42 | blake2b_init_param( S, P ); |
| 43 | S->outlen = P->inner_length; |
| 44 | return 0; |
| 45 | } |
| 46 | |
| 47 | static int blake2bp_init_root( blake2b_state *S, uint8_t outlen, uint8_t keylen ) |
| 48 | { |
no test coverage detected