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

Function blake2sp_init_leaf

freebsd/contrib/libb2/blake2sp.c:27–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25#define PARALLELISM_DEGREE 8
26
27static int blake2sp_init_leaf( blake2s_state *S, uint8_t outlen, uint8_t keylen, uint64_t offset )
28{
29 blake2s_param P[1];
30 P->digest_length = outlen;
31 P->key_length = keylen;
32 P->fanout = PARALLELISM_DEGREE;
33 P->depth = 2;
34 P->leaf_length = 0;
35 store48( P->node_offset, offset );
36 P->node_depth = 0;
37 P->inner_length = BLAKE2S_OUTBYTES;
38 memset( P->salt, 0, sizeof( P->salt ) );
39 memset( P->personal, 0, sizeof( P->personal ) );
40 blake2s_init_param( S, P );
41 S->outlen = P->inner_length;
42 return 0;
43}
44
45static int blake2sp_init_root( blake2s_state *S, uint8_t outlen, uint8_t keylen )
46{

Callers 3

blake2sp_initFunction · 0.85
blake2sp_init_keyFunction · 0.85
blake2spFunction · 0.85

Calls 3

store48Function · 0.85
memsetFunction · 0.85
blake2s_init_paramFunction · 0.70

Tested by

no test coverage detected