Function hash_buf

Source
pub fn hash_buf(buffer: &[u8]) -> Result<RawFuzzyHash, GeneratorError>
Available on crate feature easy-functions only.
Expand description

Generates a fuzzy hash from a given buffer.

ยงExample

// Requires either the "alloc" feature or std environment
// on your crate to use `to_string()` method (default enabled).
assert_eq!(
    ssdeep::hash_buf(b"Hello, World!\n").unwrap().to_string(),
    "3:aaX8v:aV"
);