{"name":"sha","version":"3.0.0","description":"Check and get file hashes","scripts":{"test":"mocha -R spec"},"repository":{"type":"git","url":"git+https://github.com/ForbesLindesay/sha.git"},"license":"(BSD-2-Clause OR MIT)","dependencies":{"graceful-fs":"^4.1.2"},"devDependencies":{"mocha":"~1.9.0"},"gitHead":"d954fa9723b0d476be1d257586ce51010e7ee106","bugs":{"url":"https://github.com/ForbesLindesay/sha/issues"},"homepage":"https://github.com/ForbesLindesay/sha#readme","_id":"sha@3.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},"dist":{"integrity":"sha512-DOYnM37cNsLNSGIG/zZWch5CKIRNoLdYUQTQlcgkRkoYIUwDYjqDyye16YcDZg/OPdcbUgTKMjc4SY6TB7ZAPw==","shasum":"b2f2f90af690c16a3a839a6a6c680ea51fedd1ae","tarball":"http://registry-npm.ywwl.com/sha/download/sha-3.0.0.tgz","fileCount":4,"unpackedSize":7246,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcSFwVCRA9TVsSAnZWagAAdeYP/iR2+5ZoSquKhskljUyE\nXwU5iyLMyUJB/yUvorSuNWV7lHeQF1QV7z99O2o85V1mMssIembpnr7z+xhL\nt6FPbG35wXsG7R3j5soLvyFu7GFL9ytu5W9dyp4S4mqjqz+omQo85TaMsPcU\nCIy/opHnW5rakZyog7dnaczzCSQfy9QNx3nPqVx1JAsypcgAvYk44j9+WYat\noDK57vBqmYwD6BoHiexOAjiADGe5sbXyUi3wb95qNnxNk0XfUilm3B6j3BMO\nbTlSFSSI6CIX/s9JZLxTABBwAebTV+vjr26sVWUJOcdjMIY2WQTElMalsVhd\nrGX/fbIvr76uFBawsf+7RSxsnaKVL0Qn6wB9SA7En+zSLhU1EDA4DYNGdwEN\nerYMB1mAkWaI7ng9hCcNLQ1apN1aieZT+U+x0nB+eG5xrQGpW4fEhIogE/L3\nFsXlm3rAKqMO+43GL+GqsOv/d/yVlwEhSyQIu/rtk1yhWKSuXAYGbUHiehEK\n1Lh698eJC9aInWgi96wQ3vlxPPTDFz27Df5fNVzzUgDavdTKTOh80t94L566\nUWnx9VsWQugxo9RXVLE83GtMtwROV2zybkX5a8t1Qkm+NgZ+OhJe9FTWi8Pr\nyszq062UpS175HdUk99w0dBZPx+o7nX/5HeYC6st7nE3pbVuy42GV/Xc1CmA\npOI9\r\n=3zwS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCmPOGD9eQfz6BgvlAflyyvMJvRd9nKtRu+0kgFUU/uSwIhAPQwtGYi8ihDBnnhTZ88GCxDDjoErxXF3aubM68mHTrr"}],"size":2869,"noattachment":false,"key":"/sha/-/sha-3.0.0.tgz"},"maintainers":[{"name":"forbeslindesay","email":"forbes@lindesay.co.uk"},{"name":"kenan","email":"kenan@kenany.me"},{"name":"thefourtheye","email":"thechargingvolcano@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sha_3.0.0_1548246037052_0.04883084989316311"},"_hasShrinkwrap":false,"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":1548246037136,"_cnpm_publish_time":1548246037136,"dist-tags":{"latest":"3.0.0"}}