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

Function blake2b_init

freebsd/contrib/libb2/blake2b-ref.c:184–202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182
183
184int blake2b_init( blake2b_state *S, size_t outlen )
185{
186 blake2b_param P[1];
187
188 if ( ( !outlen ) || ( outlen > BLAKE2B_OUTBYTES ) ) return -1;
189
190 P->digest_length = ( uint8_t ) outlen;
191 P->key_length = 0;
192 P->fanout = 1;
193 P->depth = 1;
194 store32( &P->leaf_length, 0 );
195 store64( &P->node_offset, 0 );
196 P->node_depth = 0;
197 P->inner_length = 0;
198 memset( P->reserved, 0, sizeof( P->reserved ) );
199 memset( P->salt, 0, sizeof( P->salt ) );
200 memset( P->personal, 0, sizeof( P->personal ) );
201 return blake2b_init_param( S, P );
202}
203
204
205int blake2b_init_key( blake2b_state *S, size_t outlen, const void *key, size_t keylen )

Callers 1

blake2bFunction · 0.70

Calls 4

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

Tested by

no test coverage detected