mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-09 10:39:02 -04:00
Fix needlessly separating threads and lanes in the argon2 module.
We were not using these correctly and Argon2 uses the thread count as the lane count anyway so its pointless to even have a setting for this.
This commit is contained in:
parent
bb05d0dd46
commit
1f65eb8efc
@ -169,7 +169,6 @@
|
||||
#
|
||||
# memory: Memory hardness, in KiB. E.g. 131072 KiB = 128 MiB.
|
||||
# iterations: Time hardness in iterations. (def. 3)
|
||||
# lanes: How many parallel chains can be run. (def. 1)
|
||||
# threads: Maximum amount of threads each invocation can spawn. (def. 1)
|
||||
# length: Output length in bytes. (def. 32)
|
||||
# saltlength: Salt length in bytes. (def. 16)
|
||||
|
@ -35,7 +35,6 @@ class ProviderConfig final
|
||||
{
|
||||
public:
|
||||
uint32_t iterations;
|
||||
uint32_t lanes;
|
||||
uint32_t memory;
|
||||
uint32_t outlen;
|
||||
uint32_t saltlen;
|
||||
@ -53,9 +52,6 @@ public:
|
||||
uint32_t def_iterations = def ? def->iterations : 3;
|
||||
this->iterations = tag->getNum<uint32_t>("iterations", def_iterations, 1);
|
||||
|
||||
uint32_t def_lanes = def ? def->lanes : 1;
|
||||
this->lanes = tag->getNum<uint32_t>("lanes", def_lanes, ARGON2_MIN_LANES, ARGON2_MAX_LANES);
|
||||
|
||||
uint32_t def_memory = def ? def->memory : 131072; // 128 MiB
|
||||
this->memory = tag->getNum<uint32_t>("memory", def_memory, ARGON2_MIN_MEMORY, ARGON2_MAX_MEMORY);
|
||||
|
||||
@ -98,7 +94,7 @@ public:
|
||||
size_t encodedLen = argon2_encodedlen(
|
||||
config.iterations,
|
||||
config.memory,
|
||||
config.lanes,
|
||||
config.threads,
|
||||
config.saltlen,
|
||||
config.outlen,
|
||||
argon2Type);
|
||||
|
Loading…
x
Reference in New Issue
Block a user