fuzzyhash 0.2.2

Pure Rust fuzzy hash implementation
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use fuzzyhash::FuzzyHash;
use std::env;

fn main() {
    if env::args().len() < 2 {
        println!("Please provide a file to hash!");
        return;
    }

    for i in 1..env::args().len() {
        let path = env::args().nth(i).unwrap();
        let data = std::fs::read(path).expect("Could not read file");
        let fuzzy_hash = FuzzyHash::new(data);
        println!("{}", fuzzy_hash.to_string());
    }
}