imohash
Fast hashing for large files
A rewritten version of imohash in Rust.
Usage
Add this to your Cargo.toml:
[]
= "0.1"
then
use Hasher;
// Creates a new hasher using default sample parameters
let hasher = new;
//or creates with custom sample parameters
let hasher = with_sample_size_and_threshold;
// Hashes a byte slice
let hash_value = hasher.sum.unwrap;
// Hashes a file
let hash_value = hasher.sum_file.unwrap;
Algorithm
Consult the documentation for more information.
Misuses
Because imohash only reads a small portion of a file's data, it is not suitable for:
- file verification or integrity monitoring
- cases where fixed-size files are manipulated
- anything cryptographic
The original project created by Jim Kalafut, check out https://github.com/kalafut/imohash
License: MIT