However, doc comments of Params::new and Params::RECOMMENDED_LEN does not mention this. So, I suggest mentioning this in doc comments as well. I think this makes it easier to understand that len parameter of Params::new is used only in PasswordHasher and any value is meaningless when PasswordHasher is not used.
I know this has already been mentioned in the comment.
https://github.com/RustCrypto/password-hashes/blob/7ff9080a4ead680037acd43928f4815d0bb13f7c/scrypt/src/params.rs#L14-L15
However, doc comments of
Params::new
andParams::RECOMMENDED_LEN
does not mention this. So, I suggest mentioning this in doc comments as well. I think this makes it easier to understand thatlen
parameter ofParams::new
is used only inPasswordHasher
and any value is meaningless whenPasswordHasher
is not used.