MCPcopy Create free account
hub / github.com/abbeycode/UnrarKit / blake2s_init_param

Function blake2s_init_param

Libraries/unrar/blake2s.cpp:58–72  ·  view source on GitHub ↗

init2 xors IV with input parameter block */

Source from the content-addressed store, hash-verified

56
57/* init2 xors IV with input parameter block */
58void blake2s_init_param( blake2s_state *S, uint32 node_offset, uint32 node_depth)
59{
60#ifdef USE_SSE
61 if (_SSE_Version>=SSE_SSE2)
62 blake2s_init_sse();
63#endif
64
65 S->init(); // Clean data.
66 for( int i = 0; i < 8; ++i )
67 S->h[i] = blake2s_IV[i];
68
69 S->h[0] ^= 0x02080020; // We use BLAKE2sp parameters block.
70 S->h[2] ^= node_offset;
71 S->h[3] ^= (node_depth<<16)|0x20000000;
72}
73
74
75#define G(r,i,m,a,b,c,d) \

Callers 1

blake2sp_initFunction · 0.85

Calls 2

blake2s_init_sseFunction · 0.85
initMethod · 0.45

Tested by

no test coverage detected