Closed ghost closed 3 years ago
I also just ran into this, in addition Argon2_Family::from_iterations
is also passing iterations as memory with a iteration count of 1 resulting in:
Memory: iter
Iterations: 1
parallelism: 1
Which I think is too low.
Personally I think the order should be changed in the code instead of the docs.
So:
Argon2_Family::from_params(size_t M, size_t t, size_t p) const
Becomes:
Argon2_Family::from_params(size_t t, size_t M, size_t p) const
But that would be a breaking change :(
A code change would be a disaster without changing the major version. The docs just need to be updated... simple, cheap, effective.
That's what I was thinking. Absolutely no reason to change code when changing the documentation is an option as well
Well I'm not sugesting a code change should actually be made, just in a ideal world.
Since currently from_params for Argon2 is the only one that is not using the first param as iterations so is inconsistent.
According to the docs,
However, it seems like iterations and memory are switched here. Take this snippet:
The docs say that this should output:
but it actually outputs:
This error is present both in the handbook and the internal function docs. Seems like the memory and iterations need to be swapped, whether it be in the docs or the function itself.
It's also worth noting that the docs for this function could be a lot better, honestly. Something like this: