node/deps/npm/node_modules/sha
isaacs f7b10f5445 npm: Upgrade to 1.2.21 2013-05-14 14:37:59 -07:00
..
.npmignore npm: Upgrade to 1.2.21 2013-05-14 14:37:59 -07:00
README.md npm: Upgrade to 1.2.21 2013-05-14 14:37:59 -07:00
index.js npm: Upgrade to 1.2.21 2013-05-14 14:37:59 -07:00
package.json npm: Upgrade to 1.2.21 2013-05-14 14:37:59 -07:00

README.md

sha

Check and get file hashes (using any algorithm)

Build Status Dependency Status

Installation

$ npm install sha

API

check(fileName, expected, [options,] cb)

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).

Options:

  • algorithm: defaults to sha1 and can be any of the algorithms supported by crypto.createHash

get(fileName, [options,] cb)

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.

Options:

  • algorithm: defaults to sha1 and can be any of the algorithms supported by crypto.createHash

License

BSD