Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sha256-file

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sha256-file

return an sha256sum of a given file

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
101K
decreased by-0.97%
Maintainers
1
Weekly downloads
 
Created
Source

sha256-file

Simply return an sha256 sum of a given file. If using async version (by including callback), it will stream; successfully tested on files 4 GB+.

Installation

$ npm install sha256-file

Test:

$ npm test

API

sha1File(path, [callback])

var sha256File = require('sha256-file');

// sync (no callback)

sha256File('./path/to/a_file'); // '345eec8796c03e90b9185e4ae3fc12c1e8ebafa540f7c7821fb5da7a54edc704'

// async/streamed (if using callback)

sha256File('./path/to/a_file', function (error, sum) {
  if (error) return console.log(error);
  console.log(sum) // '345eec8796c03e90b9185e4ae3fc12c1e8ebafa540f7c7821fb5da7a54edc704'
})

License

MIT

Thanks

sha256-file is based on sha1-file

Keywords

FAQs

Package last updated on 03 Mar 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc