RustCrypto / password-hashes

Password hashing functions / KDFs
678 stars 84 forks source link

`Sha256Params::new`'s `round` parameter should probably not be a `usize` #498

Closed tbu- closed 6 months ago

tbu- commented 6 months ago

Sha256Params::new

Since the number of rounds has nothing to do with the pointer width of the target CPU, a more concrete type like u32 should probably be used. This is unfortunately a breaking change.

tarcieri commented 6 months ago

I agree a u32 would probably be better. That's what we typically use for round counts in other crates. A breaking change is no problem: we're in the middle of a breaking change cycle.