diff --git a/Cargo.lock b/Cargo.lock index 3f86186..da2e070 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -194,7 +194,6 @@ dependencies = [ "base64 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", "cfb-mode 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "des 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", "pbr 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", "rayon 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -276,14 +275,6 @@ dependencies = [ "libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "itertools" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "lazy_static" version = "1.4.0" @@ -764,7 +755,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" "checksum heck 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" "checksum hermit-abi 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "e2c55f143919fbc0bc77e427fe2d74cf23786d7c1875666f2fde3ac3c659bb67" -"checksum itertools 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484" "checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" "checksum libc 0.2.66 (registry+https://github.com/rust-lang/crates.io-index)" = "d515b1f41455adea1313a4a2ac8a8a477634fbae63cc6100e3aebb207ce61558" "checksum memoffset 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "75189eb85871ea5c2e2c15abbdd541185f63b408415e5051f5cac122d8c774b9" diff --git a/Cargo.toml b/Cargo.toml index 4c61e7d..f45a38a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,6 +15,5 @@ sha2 = "0.8.1" rpassword = "4.0.5" base64 = "0.11.0" rayon = "1.3.0" -itertools = "0.8.2" pbr = "1.0.2" spinners = "1.2.0" \ No newline at end of file diff --git a/src/lib/hash.rs b/src/lib/hash.rs index fe3ffc1..a5fd159 100644 --- a/src/lib/hash.rs +++ b/src/lib/hash.rs @@ -14,7 +14,7 @@ pub fn create_key(pw: String) -> Vec { } /// Maps a list of passwords to keys and returns a vector of pairs -pub fn map_to_keys(passwords: Vec<&String>) -> Vec { +pub fn map_to_keys(passwords: Vec) -> Vec { passwords .par_iter() .map(|pw| { diff --git a/src/main.rs b/src/main.rs index 9a1ce4c..46b19c5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,7 +4,6 @@ use crate::lib::crypt::{ decrypt_brute_brute_force, decrypt_data, decrypt_with_dictionary, encrypt_data, }; use crate::lib::hash::{create_key, map_to_keys, sha_checksum, PassKey}; -use itertools::Itertools; use pbr::ProgressBar; use rayon::prelude::*; use rpassword; @@ -174,9 +173,8 @@ fn create_dictionary(_opts: &Opts, args: &CreateDictionary) { let sp = spinner("Parsing passwords..."); let dictionary: Vec; { - let pws = get_lines(&input); - sp.message("Removing duplicates".into()); - let passwords = pws.iter().unique().collect_vec(); + let passwords = get_lines(&input); + // TODO: Some form of removing duplicates (without itertools) sp.message("Mapping passwords to keys".into()); dictionary = map_to_keys(passwords); }