This library implements similarity digest hashing algorithms in rust and exposes ffi bindings for python3.
Supported algorithms include:
- ssdeep
This is a work in progress. I'd like to include these algorithms in future work:
I don't currently have this repo configured to publish to crates.io or pypi.
use fuzzy::ssdeep::*;
let digest = Hash::hash("The quick brown fox jumps over the lazy dog");
let digest_b = Hash::hash_from_file("/path/to/sample.exe");
let score = Hash::compare(&digest, &digest_b);
See the README in python/
for python3 usage.
This project started out as a exercise to learn rust and ffi in python. All comments or PRs for improvements are welcome!
- Jesse Kornblum, Identifying almost identical files using context triggered piecewise hashing, Digital Investigation, Volume 3, Supplement, 2006, Pages 91-97
- https://github.com/ssdeep-project/ssdeep
- https://github.com/rustysec/fuzzyhash-rs