sha256-file
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/sha256-file package

1.0.0 • Public • Published

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

/sha256-file/

    Package Sidebar

    Install

    npm i sha256-file

    Weekly Downloads

    106,118

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    4.07 kB

    Total Files

    5

    Last publish

    Collaborators

    • so-ta