diff --git a/scrypt/src/params.rs b/scrypt/src/params.rs index 5fd458c6..3bae3cc8 100644 --- a/scrypt/src/params.rs +++ b/scrypt/src/params.rs @@ -96,7 +96,7 @@ impl Params { // check: p <= ((2^32-1) * 32) / (128 * r) // It takes a bit of re-arranging to get the check above into this form, // but it is indeed the same. - if r * p >= 0x4000_0000 { + if u64::from(r) * u64::from(p) >= 0x4000_0000 { return Err(InvalidParams); }