New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

node-file-hash

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-file-hash

Compute the md5, sha1 and sha256 hashs of a string or buffer.

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

Node File Hash

Generated by OSS Project Generator.

Travis Status AppVeyor Status CircleCI Status Coveralls Status NPM Version License

Compute the md5, sha1 and sha256 hashs of a string or buffer.

Installation

Install package

$ npm install --save node-file-hash

Usage

const lib = require('node-file-hash');

lib.createHash('Buffer')
  .then((hash) => console.log(hash))
  .catch((err) => console.error(err));

Output

{
  "md5": "7e62bc342f41c946868f0ea6f0b712d8",
  "sha1": "2be5f64b36230104ef9c6e230215846a83d18df6",
  "sha256": "e44193fd2d21722a46c8fcab041508d4c5be95a34828b72c631df53e8d7e20a6"
}

Development

  • Cloning the repo
$ git clone https://github.com/robertoachar/node-file-hash.git
  • Installing dependencies
$ npm install
  • Running scripts
ActionUsage
Starting development modenpm start
Linting codenpm run lint
Running unit testsnpm run jest
Running code coveragenpm run coverage
Running lint + testsnpm test
Sending coverage results to Coveralls.ionpm run coveralls

Author

Roberto Achar

License

MIT

Keywords

node

FAQs

Package last updated on 28 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts