RustCrypto / password-hashes

Password hashing functions / KDFs
677 stars 84 forks source link

Mention in doc comment that `len` field of `scrypt::Params` is used only in `PasswordHasher` #449

Open sorairolake opened 1 year ago

sorairolake commented 1 year ago

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 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.

tarcieri commented 1 year ago

415 expressed some similar concerns/confusion