{"name":"sha","version":"2.0.0","description":"Check and get file hashes","scripts":{"test":"mocha -R spec"},"repository":{"type":"git","url":"https://github.com/ForbesLindesay/sha.git"},"license":"(BSD-2-Clause OR MIT)","dependencies":{"graceful-fs":"^4.1.2"},"devDependencies":{"mocha":"~1.9.0"},"gitHead":"ec239241112ded2b90d6d2438c9478fce660a2d8","bugs":{"url":"https://github.com/ForbesLindesay/sha/issues"},"homepage":"https://github.com/ForbesLindesay/sha","_id":"sha@2.0.0","_shasum":"a010d5cceca726fd7666bd20fdf2ca6439c0415f","_from":".","_npmVersion":"2.7.1","_nodeVersion":"1.6.2","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"}],"dist":{"shasum":"a010d5cceca726fd7666bd20fdf2ca6439c0415f","tarball":"http://registry-npm.ywwl.com/sha/download/sha-2.0.0.tgz","integrity":"sha512-bN6Xp/E2kR0v0TZ8RrClU3EFF14SceJL56qwK/zrn4Dxfjjtl9HF9zXLc2K8b/F9ZRIUBVKh7VI9xw27GUJxWw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDPpmLuGhhoFi3hprWAuN3nWI6UMIh6k/Hth76k10VxyAIgFix3lDXXV5N+jGR9PbbpOuKW0stUVNCzELUCX5frIEk="}],"size":3613,"noattachment":false,"key":"/sha/-/sha-2.0.0.tgz"},"directories":{},"readme":"# sha\n\nCheck and get file hashes (using any algorithm)\n\n[![Build Status](https://img.shields.io/travis/ForbesLindesay/sha/master.svg)](https://travis-ci.org/ForbesLindesay/sha)\n[![Dependency Status](https://img.shields.io/david/ForbesLindesay/sha.svg)](https://david-dm.org/ForbesLindesay/sha)\n[![NPM version](https://img.shields.io/npm/v/sha.svg)](https://www.npmjs.com/package/sha)\n\n## Installation\n\n    $ npm install sha\n\n## API\n\n### check(fileName, expected, [options,] cb) / checkSync(filename, expected, [options])\n\nAsynchronously 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).\n\nOptions:\n\n- algorithm: defaults to `sha1` and can be any of the algorithms supported by `crypto.createHash`\n\n### get(fileName, [options,] cb) / getSync(filename, [options])\n\nAsynchronously get the \"hash\" of `fileName`.  The callback will be called with an optional `error` object and the (lower cased) hex digest of the hash.\n\nOptions:\n\n- algorithm: defaults to `sha1` and can be any of the algorithms supported by `crypto.createHash`\n\n### stream(expected, [options])\n\nCheck the hash of a stream without ever buffering it.  This is a pass through stream so you can do things like:\n\n```js\nfs.createReadStream('src')\n  .pipe(sha.stream('expected'))\n  .pipe(fs.createWriteStream('dest'))\n```\n\n`dest` will be a complete copy of `src` and an error will be emitted if the hash did not match `'expected'`.\n\nOptions:\n\n- algorithm: defaults to `sha1` and can be any of the algorithms supported by `crypto.createHash`\n\n## License\n\nYou 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.","publish_time":1441560376072,"_cnpm_publish_time":1441560376072,"dist-tags":{"latest":"3.0.0"}}