diff --git a/Cargo.toml b/Cargo.toml index 11e9df4..6baddbd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,12 +20,13 @@ default = [] bench = [] [dependencies] -libc = "0.2.10" +libc = "0.2.17" rustc-serialize = "0.3.19" -dft = "0.4.3" -image = "0.9.0" -num = "0.1.32" -docopt = "0.6.80" -flate2 = "0.2.13" -sha1 = "0.1.1" -criterion-stats = "0.1.0" \ No newline at end of file +dft = "0.5.2" +image = "0.10.3" +num = "0.1.36" +docopt = "0.6.86" +flate2 = "0.2.14" +sha1 = "0.2.0" +#criterion = { git = "https://github.com/japaric/criterion.rs" } +log = "0.3.6" diff --git a/src/cache.rs b/src/cache.rs index 0549020..19b426e 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -140,7 +140,7 @@ impl<'a> Cache<'a> { let mut sha1 = Sha1::new(); sha1.update(&buf); // Return the hex result of the hash - Ok(sha1.hexdigest()) + Ok(sha1.digest().to_string()) } /** diff --git a/src/main.rs b/src/main.rs index 2eddbdc..bf47b1c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -114,13 +114,13 @@ fn get_requested_perceptual_hashes<'a>(lib: &pihash::PIHash, }; let dhash = if args.flag_dhash || flags_get_all_perceptual_hashes(&args) { - lib.get_ahash(&image_path) + lib.get_dhash(&image_path) } else { 0u64 }; let phash = if args.flag_phash || flags_get_all_perceptual_hashes(&args) { - lib.get_ahash(&image_path) + lib.get_phash(&image_path) } else { 0u64 };