{"_id":"@wmhilton/crypto-hash","_rev":"2-666165f700019f9a651b090b5a12f66b","name":"@wmhilton/crypto-hash","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.1":{"publishConfig":{"access":"public"},"name":"@wmhilton/crypto-hash","version":"1.0.1","description":"Tiny hashing module that uses the native crypto API in Node.js and the browser","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/crypto-hash.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava test.js && karmatic test-browser.js"},"keywords":["crypto","hash","isomorphic","hashing","hasher","cryptography","sha1","sha256","sha384","sha512","browser"],"devDependencies":{"@sindresorhus/is":"^0.13.0","ava":"^0.25.0","hash.js":"^1.1.5","karmatic":"1.0.6","xo":"^0.23.0"},"browser":"browser.js","gitHead":"4685fb3a2a70be142faa61de58c41194976f76a7","bugs":{"url":"https://github.com/sindresorhus/crypto-hash/issues"},"homepage":"https://github.com/sindresorhus/crypto-hash#readme","_id":"@wmhilton/crypto-hash@1.0.1","_npmVersion":"6.4.1","_nodeVersion":"10.7.0","_npmUser":{"name":"wmhilton","email":"wmhilton@gmail.com"},"dist":{"integrity":"sha512-5ZoJufHcOt10bRwE8OYnu4gcxJY1uAMZM49A4vP3edrH0c8dOD9aTb4p9KoTRNTR5bB4qgbk3q9BQ6fJpRjCWw==","shasum":"38eb981066083ea3ed79e4e7f30d5e00edecbfe8","tarball":"https://registry.npmjs.org/@wmhilton/crypto-hash/-/crypto-hash-1.0.1.tgz","fileCount":5,"unpackedSize":5551,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb9h3kCRA9TVsSAnZWagAAL8UP/1FFSO2MflYwR4wWxJTa\n90iPenu1tQ3jw0RITnNflB834urZFtj0r3lLAwPsUilVbOxoiFnraLXayIho\nl0ruYBAFvhv5ZxI6kRpZzWAHdhx5ycshKtLvxrMcURXKHD72BomJQLbe2q65\nbj7qpoDdfbRlKoE0oz9UrlYOHZrklPURYa0HMfnO3SvpmyBF9eHGuPhQM/xz\n2kpTq1V+RtayyiHkJLhygYPo+BUz7SKTgPI7DFrKWSpNb5PJZKEbL6iBsZop\nxFchq4i1maF5zZRO0ilhupHY7bnCPsSTunI8IgcMNj/OgPbyZPWP08RFFJzo\n/2jiWx7I6Kco2iZOYu2G8f96JvuL4Vj9h1Y2BmrmgaplLbCmFFEwCrB19fWj\nman5Gm5x12Kq/TTG9lhe98CQ8EVZFRkcuRg1N0Qb59Yg7qCx88gzW8mU3bac\n8DCh1VFd1vCy2t6vQgVcLsaE9pEkvjinZShEE5k70FgmfgnnX/3d+bj6r6Ld\nBZAlhSbLG9ZV5Lnhj6QlMJy2HOJst1ws3/kXNDobH45ymVJ3FmOAsU25jyaM\nzCAzXHkp1X00ev5GKBxjW2xnpBEgpGvAGtN9YuAKtsP7fMprY1gyZ6dQu9jc\n5ed8vzfejvYKO6RxMEzJi53AyjlHMcj/vMArdJ5wxonmXaat4bWlnpqLM+ca\nqVLt\r\n=mGy/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC46WbIiwZoTEpHr0CgYwNBoXDdw/0F16sd56lPOT0WVQIhAOwfGMHnVDXJ0Pxb678dTV9FhUhSQGqMHLyUcL96yW9V"}]},"maintainers":[{"name":"wmhilton","email":"wmhilton@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/crypto-hash_1.0.1_1542856163378_0.3931897213314428"},"_hasShrinkwrap":false},"1.0.2":{"publishConfig":{"access":"public"},"name":"@wmhilton/crypto-hash","version":"1.0.2","description":"Tiny hashing module that uses the native crypto API in Node.js and the browser","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/crypto-hash.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava test.js && karmatic test-browser.js"},"keywords":["crypto","hash","isomorphic","hashing","hasher","cryptography","sha1","sha256","sha384","sha512","browser"],"devDependencies":{"@sindresorhus/is":"^0.13.0","ava":"^0.25.0","hash.js":"^1.1.5","karmatic":"1.0.6","xo":"^0.23.0"},"browser":"browser.js","gitHead":"4685fb3a2a70be142faa61de58c41194976f76a7","bugs":{"url":"https://github.com/sindresorhus/crypto-hash/issues"},"homepage":"https://github.com/sindresorhus/crypto-hash#readme","_id":"@wmhilton/crypto-hash@1.0.2","_npmVersion":"6.4.1","_nodeVersion":"10.7.0","_npmUser":{"name":"wmhilton","email":"wmhilton@gmail.com"},"dist":{"integrity":"sha512-3lopwJLEfPXLA3f1Ovvtfq+uWQTLWs+rZN/KJkOniFhGhz/36ST1rpnouh1hkVQGw+qistFPpwwK17a1e0hBCg==","shasum":"76887d8ad999fc5eeb19c2894087657778c5df73","tarball":"https://registry.npmjs.org/@wmhilton/crypto-hash/-/crypto-hash-1.0.2.tgz","fileCount":5,"unpackedSize":5547,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJb9iIVCRA9TVsSAnZWagAA55gP/2CRL9GYL7NlPCSZkBM2\n8d2gjVVScjn1e4CjlxtySiT4UkreTXjilTpW3vV3zc3BjFmQT6r0fYLajOIC\nTLbHu7edp1ikYbaSDRu8SDedFJROKDUIGUpA+hE7n2wY6ZPe6l1743XVVezW\nDsZ3Hr2oOIciDZTEFlahAJ1k0j4ZPbKxxk6z4aijfZ6JEuik2eXigX8CNdtN\nnVkDnf1DODRfWWh9OEPY+P7N0JV52Jw0SvBE2RJAZckceyqwFIXqvRrKdlah\ndi/WF61cT+xjNyqnv3x3ugdqtv2NI699IrVaqwpWMY6yO3SmYwV5Y0GrOWHZ\noerWh1ypABwwdjy6jdJf8WewZwMukXwwAnn5wNpx53Mhn5X6GdiJHEsbNoY8\ndpZe7iU75wR/o7OvuWzH4Got4b10Sy2nok4QBz4murvGfeR/ioYNH5G1puBb\n2vu+DTzK5nIGrF0ksH3co72dLE9uKf+RtA9Z2bxSMOFa/BULLMiW2hto6TK3\nZXfEC1R+rxonorw4K9bBOPx7sBYAT17Ldet+u8MHrgFfsfNqJdpwEQZp5yfZ\n4GKdLT1H/afbpd1BxD9MIk1kCv4FvXD3w9KC2MlZxLkamZ35BNQP4qnQBGf1\njl6ity0wKENZ05bPmauBUz5Q2m0MR/Dfm6NZ3J42Mw5z8AIBzxVb9dWfQELd\nIPTJ\r\n=9Jbf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC11b9gfqyzDWeD5VjnH9BD5vxHD3P62gOp7kORUnip2AIgRpMPGcFMas/9KdXQ8w8Xp2IRAaAsUCOYRavx+81iJSY="}]},"maintainers":[{"name":"wmhilton","email":"wmhilton@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/crypto-hash_1.0.2_1542857236582_0.5381882981216284"},"_hasShrinkwrap":false}},"time":{"created":"2018-11-22T03:09:23.213Z","1.0.1":"2018-11-22T03:09:23.479Z","modified":"2022-04-11T09:53:55.048Z","1.0.2":"2018-11-22T03:27:16.744Z"},"maintainers":[{"name":"wmhilton","email":"wmhilton@gmail.com"}],"description":"Tiny hashing module that uses the native crypto API in Node.js and the browser","homepage":"https://github.com/sindresorhus/crypto-hash#readme","keywords":["crypto","hash","isomorphic","hashing","hasher","cryptography","sha1","sha256","sha384","sha512","browser"],"repository":{"type":"git","url":"git+https://github.com/sindresorhus/crypto-hash.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"bugs":{"url":"https://github.com/sindresorhus/crypto-hash/issues"},"license":"MIT","readme":"# crypto-hash [![Build Status](https://travis-ci.org/sindresorhus/crypto-hash.svg?branch=master)](https://travis-ci.org/sindresorhus/crypto-hash)\n\n> Tiny hashing module that uses the native crypto API in Node.js and the browser\n\nUseful when you want the same hashing API in all environments. My cat calls it *isomorphic*.\n\nIn Node.js it uses [`require('crypto')`](https://nodejs.org/api/crypto.html#crypto_class_hash), while in the browser it uses [`window.crypto`](https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest).\n\nThe browser version is only ~300 bytes minified & gzipped.\n\n\n## Install\n\n```\n$ npm install crypto-hash\n```\n\n<a href=\"https://www.patreon.com/sindresorhus\">\n\t<img src=\"https://c5.patreon.com/external/logo/become_a_patron_button@2x.png\" width=\"160\">\n</a>\n\n\n## Usage\n\n```js\nconst {sha256} = require('crypto-hash');\n\n(async () => {\n\tconsole.log(await sha256('🦄'));\n\t//=> '5df82936cbf0864be4b7ba801bee392457fde9e4'\n})();\n```\n\n\n## API\n\n### sha1(input, [options])\n### sha256(input, [options])\n### sha384(input, [options])\n### sha512(input, [options])\n\nReturns a `Promise<string>` with a hex-encoded hash.\n\n*Note that even though it returns a promise, [in Node.js, the operation is synchronous 💩](https://github.com/nodejs/node/issues/678).*\n\n[SHA-1 is insecure](https://stackoverflow.com/a/38045085/64949) and should not be used for anything sensitive.\n\n#### input\n\nType: `string` [`ArrayBuffer`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) [`ArrayBufferView`](https://developer.mozilla.org/en-US/docs/Web/API/ArrayBufferView)\n\n#### options\n\nType: `Object`\n\n##### outputFormat\n\nType: `string`<br>\nValues: `hex` `buffer`<br>\nDefault: `hex`\n\nSetting this to `buffer` makes it return an `ArrayBuffer` instead of a `string`.\n\n\n## Related\n\n- [hasha](https://github.com/sindresorhus/hasha) - Hashing in Node.js made simple\n\n\n## License\n\nMIT © [Sindre Sorhus](https://sindresorhus.com)\n","readmeFilename":"readme.md"}