MCPcopy Create free account
hub / github.com/F-Stack/f-stack / blake2bp_init_leaf

Function blake2bp_init_leaf

freebsd/contrib/libb2/blake2bp.c:28–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26#define PARALLELISM_DEGREE 4
27
28static 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
47static int blake2bp_init_root( blake2b_state *S, uint8_t outlen, uint8_t keylen )
48{

Callers 3

blake2bp_initFunction · 0.85
blake2bp_init_keyFunction · 0.85
blake2bpFunction · 0.85

Calls 4

store32Function · 0.85
store64Function · 0.85
memsetFunction · 0.85
blake2b_init_paramFunction · 0.70

Tested by

no test coverage detected