diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml index 52e0999a..50089e7b 100644 --- a/fuzz/Cargo.toml +++ b/fuzz/Cargo.toml @@ -10,7 +10,6 @@ cargo-fuzz = true [dependencies] libfuzzer-sys = "0.4" scrypt = { path = "../scrypt", features = ["simple"]} -hex = "0.4" [[bin]] name = "scrypt_fuzzer" diff --git a/fuzz/fuzz_targets/scrypt_fuzzer.rs b/fuzz/fuzz_targets/scrypt_fuzzer.rs index 954a0f30..73d3e1b6 100644 --- a/fuzz/fuzz_targets/scrypt_fuzzer.rs +++ b/fuzz/fuzz_targets/scrypt_fuzzer.rs @@ -107,7 +107,7 @@ fuzz_target!(|data: &[u8]| { let salt_value = salt_string.as_salt(); // Safe to use now - let formatted_hash = format!("$scrypt$ln=16,r=8,p=1${}$invalid$", hex::encode(password)); + let formatted_hash = format!("$scrypt$ln=16,r=8,p=1${}$invalid$", base64ct::Base64::encode_string(password)); if let Ok(hash) = PasswordHash::new(SAMPLE_HASH).or_else(|_| PasswordHash::new(formatted_hash.as_str()))