Initialize the argon2 position structure a bit earlier
This commit is contained in:
parent
8ab638b983
commit
40070b342a
@ -290,21 +290,19 @@ index_alpha(const argon2_instance_t *instance,
|
|||||||
void
|
void
|
||||||
fill_memory_blocks(argon2_instance_t *instance, uint32_t pass)
|
fill_memory_blocks(argon2_instance_t *instance, uint32_t pass)
|
||||||
{
|
{
|
||||||
|
argon2_position_t position;
|
||||||
|
uint32_t l;
|
||||||
uint32_t s;
|
uint32_t s;
|
||||||
|
|
||||||
if (instance == NULL || instance->lanes == 0) {
|
if (instance == NULL || instance->lanes == 0) {
|
||||||
return; /* LCOV_EXCL_LINE */
|
return; /* LCOV_EXCL_LINE */
|
||||||
}
|
}
|
||||||
|
|
||||||
for (s = 0; s < ARGON2_SYNC_POINTS; ++s) {
|
|
||||||
uint32_t l;
|
|
||||||
|
|
||||||
for (l = 0; l < instance->lanes; ++l) {
|
|
||||||
argon2_position_t position;
|
|
||||||
|
|
||||||
position.pass = pass;
|
position.pass = pass;
|
||||||
position.lane = l;
|
for (s = 0; s < ARGON2_SYNC_POINTS; ++s) {
|
||||||
position.slice = (uint8_t) s;
|
position.slice = (uint8_t) s;
|
||||||
|
for (l = 0; l < instance->lanes; ++l) {
|
||||||
|
position.lane = l;
|
||||||
position.index = 0;
|
position.index = 0;
|
||||||
fill_segment(instance, position);
|
fill_segment(instance, position);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user