{"id":19978750,"url":"https://github.com/s3rvac/ssdeep-rs","last_synced_at":"2025-05-04T04:32:05.863Z","repository":{"id":57668434,"uuid":"72561382","full_name":"s3rvac/ssdeep-rs","owner":"s3rvac","description":"A Rust wrapper for ssdeep.","archived":false,"fork":false,"pushed_at":"2023-11-14T15:09:54.000Z","size":550,"stargazers_count":8,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-28T19:50:37.722Z","etag":null,"topics":["fuzzy-hashing","rust","ssdeep"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/s3rvac.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-01T17:49:27.000Z","updated_at":"2024-01-14T12:44:19.000Z","dependencies_parsed_at":"2024-11-13T03:35:17.164Z","dependency_job_id":"10794b7a-481d-4a10-9c6c-59374e07ac68","html_url":"https://github.com/s3rvac/ssdeep-rs","commit_stats":{"total_commits":34,"total_committers":1,"mean_commits":34.0,"dds":0.0,"last_synced_commit":"f76e59ca412e9dc3abcda4c1da7b729bf3653d8d"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s3rvac%2Fssdeep-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s3rvac%2Fssdeep-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s3rvac%2Fssdeep-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s3rvac%2Fssdeep-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/s3rvac","download_url":"https://codeload.github.com/s3rvac/ssdeep-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252288912,"owners_count":21724323,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fuzzy-hashing","rust","ssdeep"],"created_at":"2024-11-13T03:35:11.085Z","updated_at":"2025-05-04T04:32:00.839Z","avatar_url":"https://github.com/s3rvac.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rust wrapper for ssdeep\n\n[![docs.rs](https://docs.rs/ssdeep/badge.svg)](https://docs.rs/ssdeep)\n[![crates.io](https://img.shields.io/crates/v/ssdeep.svg)](https://crates.io/crates/ssdeep)\n\nA Rust wrapper for [ssdeep by Jesse\nKornblum](https://ssdeep-project.github.io/ssdeep/), which is a C library for\ncomputing [context triggered piecewise\nhashes](http://dfrws.org/2006/proceedings/12-Kornblum.pdf) (CTPH). Also called\nfuzzy hashes, CTPH can match inputs that have homologies. Such inputs have\nsequences of identical bytes in the same order, although bytes in between these\nsequences may be different in both content and length. In contrast to standard\nhashing algorithms, CTPH can be used to identify files that are highly similar\nbut not identical. For more details, see [this blog\npost](https://blog.petrzemek.net/2016/11/01/computing-context-triggered-piecewise-hashes-in-rust/).\n\n## Installation\n\nAdd the following lines into your `Cargo.toml` file:\n```\n[dependencies]\nssdeep = \"0.6.0\"\n```\n\nThen, when you run `cargo build`, it will automatically get the wrapper's\nsource code from [crates.io](https://crates.io/), compile the underlying C\nlibrary, and build the wrapper. The C library is statically linked into the\nwrapper.\n\nThe build process is known to work under Linux with GCC. If you have a\ndifferent operating system or compiler and the build fails, you can\n[submit a pull request](https://github.com/s3rvac/ssdeep-rs/pulls) or [open an\nissue](https://github.com/s3rvac/ssdeep-rs/issues).\n\n## Usage\n\nTo compute the fuzzy hash of the given bytes, use the `hash()` function:\n```rust\nextern crate ssdeep;\n\nlet h = ssdeep::hash(b\"Hello there!\").unwrap();\nassert_eq!(h, \"3:aNRn:aNRn\");\n```\n\nTo obtain the fuzzy hash of the contents of a file, use `hash_from_file()`:\n```rust\nlet h = ssdeep::hash_from_file(\"path/to/file\").unwrap();\n```\n\nTo compare two fuzzy hashes, use `compare()`, which returns an integer between\n0 (no match) and 100:\n```rust\nlet h1 = \"3:AXGBicFlgVNhBGcL6wCrFQEv:AXGHsNhxLsr2C\";\nlet h2 = \"3:AXGBicFlIHBGcL6wCrFQEv:AXGH6xLsr2Cx\";\nlet score = ssdeep::compare(h1, h2).unwrap();\nassert_eq!(score, 22);\n```\n\nEach of these functions returns a\n[`Result`](https://doc.rust-lang.org/std/result/enum.Result.html), where an\nerror is returned when the underlying C function fails.\n\n## Documentation\n\nAn automatically generated API documentation is available here:\n\n* [latest](https://docs.rs/ssdeep/)\n* [0.6.0](https://docs.rs/ssdeep/0.6.0/ssdeep/)\n* [0.5.0](https://docs.rs/ssdeep/0.5.0/ssdeep/)\n* [0.4.0](https://docs.rs/ssdeep/0.4.0/ssdeep/)\n* [0.3.0](https://docs.rs/ssdeep/0.3.0/ssdeep/)\n* [0.2.0](https://docs.rs/ssdeep/0.2.0/ssdeep/)\n* [0.1.0](https://docs.rs/ssdeep/0.1.0/ssdeep/)\n\n## License\n\nThe wrapper's code is licensed under the terms of GPLv3.\n\nThis wrapper includes the unchanged source distribution of\n[ssdeep](https://github.com/ssdeep-project/ssdeep/) (commit `d8705da60`),\nwhich is compiled and statically linked into the wrapper during build. It is\nlicensed under GPLv2.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs3rvac%2Fssdeep-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fs3rvac%2Fssdeep-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs3rvac%2Fssdeep-rs/lists"}