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

Function blake2sp_init_root

freebsd/contrib/libb2/blake2sp.c:45–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45static int blake2sp_init_root( blake2s_state *S, uint8_t outlen, uint8_t keylen )
46{
47 blake2s_param P[1];
48 P->digest_length = outlen;
49 P->key_length = keylen;
50 P->fanout = PARALLELISM_DEGREE;
51 P->depth = 2;
52 P->leaf_length = 0;
53 store48( P->node_offset, 0ULL );
54 P->node_depth = 1;
55 P->inner_length = BLAKE2S_OUTBYTES;
56 memset( P->salt, 0, sizeof( P->salt ) );
57 memset( P->personal, 0, sizeof( P->personal ) );
58 blake2s_init_param( S, P );
59 S->outlen = P->digest_length;
60 return 0;
61}
62
63
64int blake2sp_init( blake2sp_state *S, size_t outlen )

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