sigdb
v3.0.1
Published
A file signature database manager
Downloads
113
Maintainers
Readme
sigdb
A file signature database manager
Usage
To install:
npm install -E sigdb
To use:
const { createSignatureDatabase }= require('sigdb')
const sigdb = await createSignatureDatabase()
Methods
/**
* Provided a buffer of binary bytes, will return either the matching signature name as a string, or `undefined`
*/
find(haystack: Buffer): FileSignatureRecord | undefined
/**
* Get an array of signature names in the database
*/
getSignatureNames(): string[]
/**
* Add a file signature
*/
addFileSignature(id: string, name: string, signature: Buffer): void
Types
/**
* @typedef FileSignatureRecord
* @property {string} id
* @property {Buffer} signature
* @property {String} name
*/