Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/memcorrupt/fast-ssdeep
Node.js binding for the ssdeep CTPH library
https://github.com/memcorrupt/fast-ssdeep
ctph fuzzy hashing nodejs ssdeep
Last synced: 23 days ago
JSON representation
Node.js binding for the ssdeep CTPH library
- Host: GitHub
- URL: https://github.com/memcorrupt/fast-ssdeep
- Owner: memcorrupt
- License: mit
- Created: 2024-06-18T06:58:24.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-08-16T23:58:48.000Z (3 months ago)
- Last Synced: 2024-09-28T19:04:29.220Z (about 2 months ago)
- Topics: ctph, fuzzy, hashing, nodejs, ssdeep
- Language: C
- Homepage:
- Size: 22.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fast-ssdeep
[![Version](https://img.shields.io/npm/v/fast-ssdeep.svg)](https://www.npmjs.org/package/fast-ssdeep)
[![Downloads](https://img.shields.io/npm/dm/fast-ssdeep.svg)](https://www.npmjs.com/package/fast-ssdeep)
[![Build Status](https://github.com/memcorrupt/fast-ssdeep/actions/workflows/build.yml/badge.svg)](https://github.com/memcorrupt/fast-ssdeep/actions/workflows/build.yml)
[![License](https://img.shields.io/github/license/memcorrupt/fast-ssdeep)](LICENSE)Node.js binding for the ssdeep CTPH library.
[ssdeep project website](https://ssdeep-project.github.io/ssdeep/index.html)
# Installation
Install the [fast-ssdeep](https://npmjs.org/package/fast-ssdeep) package from the NPM registry using your package manager of choice.
Example:
```
npm install fast-ssdeep
# or
yarn add fast-ssdeep
# or
pnpm install fast-ssdeep
```# Documentation
### `ssdeep.hash(contents: string|Buffer): Promise`
Asynchronously calculate an ssdeep hash based on the `contents` argument, which can be a string or Buffer.
### `ssdeep.hashSync(contents: string|Buffer): string`
Synchronously calculate an ssdeep hash based on the `contents` argument, which can be a string or Buffer.
### `ssdeep.compare(hash1: string, hash2: string): Promise`
Asynchronously compare two ssdeep hashes to generate a similarity score. Both hashes must be passed as strings, and a similarity between 0-100 will be returned.
### `ssdeep.compareSync(hash1: string, hash2: string): number`
Synchronously compare two ssdeep hashes to generate a similarity score. Both hashes must be passed as strings, and a similarity between 0-100 will be returned.