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

Function blake2bp_init_root

freebsd/contrib/libb2/blake2bp.c:47–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47static int blake2bp_init_root( blake2b_state *S, uint8_t outlen, uint8_t keylen )
48{
49 blake2b_param P[1];
50 P->digest_length = outlen;
51 P->key_length = keylen;
52 P->fanout = PARALLELISM_DEGREE;
53 P->depth = 2;
54 store32(&P->leaf_length, 0);
55 store64(&P->node_offset, 0);
56 P->node_depth = 1;
57 P->inner_length = BLAKE2B_OUTBYTES;
58 memset( P->reserved, 0, sizeof( P->reserved ) );
59 memset( P->salt, 0, sizeof( P->salt ) );
60 memset( P->personal, 0, sizeof( P->personal ) );
61 blake2b_init_param( S, P );
62 S->outlen = P->digest_length;
63 return 0;
64}
65
66
67int blake2bp_init( blake2bp_state *S, size_t outlen )

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