"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/sha/README.md" (11 Apr 2017, 1744 Bytes) of package /windows/misc/atom-windows.zip:

As a special service "Fossies" has tried to format the requested source page into HTML format (assuming markdown format). Alternatively you can here view or download the uninterpreted source code file. A member file download can also be achieved by clicking within a package contents listing on the according byte size field.


Check and get file hashes (using any algorithm)

Build Status Dependency Status NPM version


$ npm install sha


check(fileName, expected, [options,] cb) / checkSync(filename, expected, [options])

Asynchronously check that fileName has a "hash" of expected. The callback will be called with either null or an error (indicating that they did not match).


get(fileName, [options,] cb) / getSync(filename, [options])

Asynchronously get the "hash" of fileName. The callback will be called with an optional error object and the (lower cased) hex digest of the hash.


stream(expected, [options])

Check the hash of a stream without ever buffering it. This is a pass through stream so you can do things like:


dest will be a complete copy of src and an error will be emitted if the hash did not match 'expected'.



You may use this software under the BSD or MIT. Take your pick. If you want me to release it under another license, open a pull request.