{"_id":"fast-sha256","_rev":"180976","name":"fast-sha256","description":"SHA-256, HMAC and PBKDF2 implementation with typed arrays for modern browsers and Node.js","dist-tags":{"latest":"1.3.0"},"maintainers":[{"name":"dchest","email":"dmitry@codingrobots.com"}],"time":{"modified":"2021-06-03T12:04:46.000Z","created":"2014-07-11T14:22:14.327Z","1.3.0":"2020-01-16T15:52:26.112Z","1.2.0":"2020-01-06T14:15:17.209Z","1.1.1":"2019-10-28T19:07:22.301Z","1.1.0":"2017-11-17T10:55:46.822Z","1.0.0":"2016-03-18T20:11:32.224Z","0.9.2":"2014-09-03T13:04:02.691Z","0.9.1":"2014-07-11T14:22:14.327Z"},"users":{"ricmoo":true,"anasyusuf":true},"author":{"name":"Dmitry Chestnykh"},"repository":{"type":"git","url":"git+https://github.com/dchest/fast-sha256-js.git"},"versions":{"1.3.0":{"name":"fast-sha256","version":"1.3.0","description":"SHA-256, HMAC and PBKDF2 implementation with typed arrays for modern browsers and Node.js","main":"sha256.js","typings":"sha256","directories":{"test":"test"},"scripts":{"build":"tsc && echo '});' | cat build/umd-prelude.js build/sha256.js - > sha256.js && rm build/sha256.js && uglifyjs sha256.js -c -m -o sha256.min.js && mv build/sha256.d.ts ./","test":"tape test/test.js | faucet","bench":"node test/bench.js","lint":"tslint src/*.ts"},"repository":{"type":"git","url":"git+https://github.com/dchest/fast-sha256-js.git"},"keywords":["hash","sha256","pbkdf2","cryptography","crypto","hmac"],"author":{"name":"Dmitry Chestnykh"},"license":"Unlicense","devDependencies":{"faucet":"0.x.x","tape":"4.11.0","tslint":"^5.20.0","typescript":"^3.6.4","uglify-js":"^3.1.9"},"gitHead":"2cee3ccb977bd4b10e8eeb7fa95036b1d08f2529","bugs":{"url":"https://github.com/dchest/fast-sha256-js/issues"},"homepage":"https://github.com/dchest/fast-sha256-js#readme","_id":"fast-sha256@1.3.0","_nodeVersion":"13.6.0","_npmVersion":"6.13.4","_npmUser":{"name":"dchest","email":"dmitry@codingrobots.com"},"dist":{"shasum":"7916ba2054eeb255982608cccd0f6660c79b7ae6","size":9135,"noattachment":false,"key":"/fast-sha256/-/fast-sha256-1.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/fast-sha256/download/fast-sha256-1.3.0.tgz"},"maintainers":[{"name":"dchest","email":"dmitry@codingrobots.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fast-sha256_1.3.0_1579189945935_0.8547197513565707"},"_hasShrinkwrap":false,"publish_time":1579189946112,"_cnpm_publish_time":1579189946112},"1.2.0":{"name":"fast-sha256","version":"1.2.0","description":"SHA-256, HMAC and PBKDF2 implementation with typed arrays for modern browsers and Node.js","main":"sha256.js","typings":"sha256","directories":{"test":"test"},"scripts":{"build":"tsc && echo '});' | cat build/umd-prelude.js build/sha256.js - > sha256.js && rm build/sha256.js && uglifyjs sha256.js -c -m -o sha256.min.js && mv build/sha256.d.ts ./","test":"tape test/test.js | faucet","bench":"node test/bench.js","lint":"tslint src/*.ts"},"repository":{"type":"git","url":"git+https://github.com/dchest/fast-sha256-js.git"},"keywords":["hash","sha256","pbkdf2","cryptography","crypto","hmac"],"author":{"name":"Dmitry Chestnykh"},"license":"Unlicense","devDependencies":{"faucet":"0.x.x","tape":"4.11.0","tslint":"^5.20.0","typescript":"^3.6.4","uglify-js":"^3.1.9"},"gitHead":"7376754c0e90a67446b3683858d499c98c5ff73e","bugs":{"url":"https://github.com/dchest/fast-sha256-js/issues"},"homepage":"https://github.com/dchest/fast-sha256-js#readme","_id":"fast-sha256@1.2.0","_nodeVersion":"13.5.0","_npmVersion":"6.13.4","_npmUser":{"name":"dchest","email":"dmitry@codingrobots.com"},"dist":{"shasum":"ddcffee521225f1b26b2a7b6a8dee14768f3940c","size":9044,"noattachment":false,"key":"/fast-sha256/-/fast-sha256-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/fast-sha256/download/fast-sha256-1.2.0.tgz"},"maintainers":[{"name":"dchest","email":"dmitry@codingrobots.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fast-sha256_1.2.0_1578320117020_0.17635817273523768"},"_hasShrinkwrap":false,"publish_time":1578320117209,"_cnpm_publish_time":1578320117209},"1.1.1":{"name":"fast-sha256","version":"1.1.1","description":"SHA-256, HMAC and PBKDF2 implementation with typed arrays for modern browsers and Node.js","main":"sha256.js","typings":"sha256","directories":{"test":"test"},"scripts":{"build":"tsc && echo '});' | cat build/umd-prelude.js build/sha256.js - > sha256.js && rm build/sha256.js && uglifyjs sha256.js -c -m -o sha256.min.js && mv build/sha256.d.ts ./","test":"tape test/test.js | faucet","bench":"node test/bench.js","lint":"tslint src/*.ts"},"repository":{"type":"git","url":"git+https://github.com/dchest/fast-sha256-js.git"},"keywords":["hash","sha256","pbkdf2","cryptography","crypto","hmac"],"author":{"name":"Dmitry Chestnykh"},"license":"Unlicense","devDependencies":{"faucet":"0.x.x","tape":"4.11.0","tslint":"^5.20.0","typescript":"^3.6.4","uglify-js":"^3.1.9"},"gitHead":"60e65dc836385126a1859e6697144379284e181c","bugs":{"url":"https://github.com/dchest/fast-sha256-js/issues"},"homepage":"https://github.com/dchest/fast-sha256-js#readme","_id":"fast-sha256@1.1.1","_nodeVersion":"12.9.1","_npmVersion":"6.10.3","_npmUser":{"name":"dchest","email":"dmitry@codingrobots.com"},"dist":{"shasum":"2a1fca6a7fd0943da478f17760d19cf52ba78dea","size":8336,"noattachment":false,"key":"/fast-sha256/-/fast-sha256-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/fast-sha256/download/fast-sha256-1.1.1.tgz"},"maintainers":[{"name":"dchest","email":"dmitry@codingrobots.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fast-sha256_1.1.1_1572289642173_0.30856082531814777"},"_hasShrinkwrap":false,"publish_time":1572289642301,"_cnpm_publish_time":1572289642301},"1.1.0":{"name":"fast-sha256","version":"1.1.0","description":"SHA-256, HMAC and PBKDF2 implementation with typed arrays for modern browsers and Node.js","main":"sha256.js","typings":"sha256","scripts":{"build":"tsc && echo '});' | cat build/umd-prelude.js build/sha256.js - > sha256.js && rm build/sha256.js && uglifyjs sha256.js -c -m -o sha256.min.js && mv build/sha256.d.ts ./","test":"tape test/test.js | faucet","bench":"node test/bench.js","lint":"tslint src/*.ts"},"repository":{"type":"git","url":"https://github.com/dchest/fast-sha256-js"},"keywords":["hash","sha256","pbkdf2","cryptography","crypto","hmac"],"author":{"name":"Dmitry Chestnykh"},"license":"Unlicense","devDependencies":{"faucet":"0.x.x","tape":"2.x.x","tslint":"^3.6.0","typescript":"^2.6.1","uglify-js":"^3.1.9"},"licenseText":"This is free and unencumbered software released into the public domain.\n\nAnyone is free to copy, modify, publish, use, compile, sell, or\ndistribute this software, either in source code form or as a compiled\nbinary, for any purpose, commercial or non-commercial, and by any\nmeans.\n\nIn jurisdictions that recognize copyright laws, the author or authors\nof this software dedicate any and all copyright interest in the\nsoftware to the public domain. We make this dedication for the benefit\nof the public at large and to the detriment of our heirs and\nsuccessors. We intend this dedication to be an overt act of\nrelinquishment in perpetuity of all present and future rights to this\nsoftware under copyright law.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR\nOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\nFor more information, please refer to <http://unlicense.org>\n","_id":"fast-sha256@1.1.0","dist":{"shasum":"b640189403c7ff0d796d1251a1c1f6954c40e7b4","size":1568514,"noattachment":false,"key":"/fast-sha256/-/fast-sha256-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/fast-sha256/download/fast-sha256-1.1.0.tgz"},"maintainers":[{"name":"dchest","email":"dmitry@codingrobots.com"}],"_npmUser":{"name":"dchest","email":"dmitry@codingrobots.com"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fast-sha256-1.1.0.tgz_1510916145074_0.9353431835770607"},"directories":{},"publish_time":1510916146822,"_cnpm_publish_time":1510916146822,"_hasShrinkwrap":false},"1.0.0":{"name":"fast-sha256","version":"1.0.0","description":"SHA-256, HMAC and PBKDF2 implementation with typed arrays for modern browsers and Node.js","main":"sha256.js","typings":"sha256","directories":{"test":"test"},"scripts":{"build":"tsc && echo '});' | cat build/umd-prelude.js build/sha256.js - > sha256.js && rm build/sha256.js && uglifyjs sha256.js -c -m -o sha256.min.js && mv build/sha256.d.ts ./","test":"tape test/test.js | faucet","bench":"node test/bench.js","lint":"tslint src/*.ts"},"repository":{"type":"git","url":"git+https://github.com/dchest/fast-sha256-js.git"},"keywords":["hash","sha256","pbkdf2","cryptography","crypto","hmac"],"author":{"name":"Dmitry Chestnykh"},"license":"Public domain","devDependencies":{"faucet":"0.x.x","tape":"2.x.x","tslint":"^3.6.0","typescript":"^1.8.9","uglify-js":"2.x.x"},"gitHead":"40bce2c1ca92432a2b7d1f8932931eb27fb6463b","bugs":{"url":"https://github.com/dchest/fast-sha256-js/issues"},"homepage":"https://github.com/dchest/fast-sha256-js#readme","_id":"fast-sha256@1.0.0","_shasum":"217edc0ffc36c117a37c55b87e5381d99b44d1dd","_from":".","_npmVersion":"3.7.3","_nodeVersion":"5.6.0","_npmUser":{"name":"dchest","email":"dmitry@codingrobots.com"},"dist":{"shasum":"217edc0ffc36c117a37c55b87e5381d99b44d1dd","size":1567713,"noattachment":false,"key":"/fast-sha256/-/fast-sha256-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/fast-sha256/download/fast-sha256-1.0.0.tgz"},"maintainers":[{"name":"dchest","email":"dmitry@codingrobots.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/fast-sha256-1.0.0.tgz_1458331889141_0.4358875979669392"},"publish_time":1458331892224,"_cnpm_publish_time":1458331892224,"_hasShrinkwrap":false},"0.9.2":{"name":"fast-sha256","version":"0.9.2","description":"SHA-256, HMAC and PBKDF2 implementation with typed arrays for modern browsers and Node.js","main":"sha256.js","directories":{"test":"test"},"scripts":{"build":"uglifyjs sha256.js -c -m -o sha256.min.js","test":"tape test/test.js | faucet"},"repository":{"type":"git","url":"https://github.com/dchest/fast-sha256-js"},"keywords":["hash","sha256","pbkdf2","cryptography","crypto","hmac"],"author":{"name":"Dmitry Chestnykh"},"license":"Public domain","devDependencies":{"faucet":"0.x.x","tape":"2.x.x","uglify-js":"2.x.x"},"gitHead":"67268a815b868e41a27710db497123e531563b8c","bugs":{"url":"https://github.com/dchest/fast-sha256-js/issues"},"homepage":"https://github.com/dchest/fast-sha256-js","_id":"fast-sha256@0.9.2","_shasum":"e708af63f71a142ff2c06901366f9728d458a334","_from":".","_npmVersion":"2.0.0-beta.0","_npmUser":{"name":"dchest","email":"dmitry@codingrobots.com"},"maintainers":[{"name":"dchest","email":"dmitry@codingrobots.com"}],"dist":{"shasum":"e708af63f71a142ff2c06901366f9728d458a334","size":1563893,"noattachment":false,"key":"/fast-sha256/-/fast-sha256-0.9.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/fast-sha256/download/fast-sha256-0.9.2.tgz"},"publish_time":1409749442691,"_cnpm_publish_time":1409749442691,"_hasShrinkwrap":false},"0.9.1":{"name":"fast-sha256","version":"0.9.1","description":"SHA-256, HMAC and PBKDF2 implementation with typed arrays for modern browsers and Node.js","main":"sha256.js","directories":{"test":"test"},"scripts":{"build":"uglifyjs sha256.js -c -m -o sha256.min.js","test":"tape test/test.js | faucet"},"keywords":["hash","sha256","pbkdf2","cryptography","crypto","hmac"],"author":{"name":"Dmitry Chestnykh"},"license":"Public domain","devDependencies":{"faucet":"0.0.1","tape":"^2.13.3"},"gitHead":"d55fb92aa8528de6c2435f43d66c82ab54df0173","_id":"fast-sha256@0.9.1","_shasum":"5df14bce87592d904a739bfd57946cf0754e0b36","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"dchest","email":"dmitry@codingrobots.com"},"maintainers":[{"name":"dchest","email":"dmitry@codingrobots.com"}],"dist":{"shasum":"5df14bce87592d904a739bfd57946cf0754e0b36","size":1563858,"noattachment":false,"key":"/fast-sha256/-/fast-sha256-0.9.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/fast-sha256/download/fast-sha256-0.9.1.tgz"},"publish_time":1405088534327,"_cnpm_publish_time":1405088534327,"_hasShrinkwrap":false}},"readme":"fast-sha256-js\n==============\n\nSHA-256 implementation for JavaScript/TypeScript with typed arrays\nthat works in modern browsers and Node.js.\nImplements the hash function, HMAC, and PBKDF2.\n\nPublic domain. No warranty.\n\n[![Build Status](https://travis-ci.org/dchest/fast-sha256-js.svg?branch=master)\n](https://travis-ci.org/dchest/fast-sha256-js)\n\n\nInstallation\n------------\n\nYou can install fast-sha256-js via [NPM](https://www.npmjs.org/):\n\n    $ npm install fast-sha256\n\nor [download source code](https://github.com/dchest/fast-sha256-js/releases).\n\n\nUsage\n-----\n\nFunctions accept and return `Uint8Array`s.\nTo convert strings, use external library (for example,\n[nacl.util](https://github.com/dchest/tweetnacl-util-js/)).\n\n### sha256(message)\n\nReturns a SHA-256 hash of the message.\n\n\n### sha256.hmac(key, message)\n\nReturns an HMAC-SHA-256 of the message for the key.\n\n\n### sha256.pbkdf2(password, salt, rounds, dkLen)\n\nReturns a key of length dkLen derived using PBKDF2-HMAC-SHA256\nfrom the given password, salt, and the number of rounds.\n\n\n### sha256.hkdf(key, salt, info?, length?)\n\nReturns a key of the given length derived using HKDF as\ndescribed in RFC 5869.\n\nThere are also classes `Hash` and `HMAC`:\n\n### new sha256.Hash()\n\nConstructor for hash instance. Should be used with `new`.\nAvailable methods: `update()`, `digest()`, `reset()`, etc.\n\n### new sha256.HMAC(key)\n\nConstructor for HMAC instance. Should be used with `new`.\nAvailable methods: `update()`, `digest()`, `reset()`, etc.\n\nSee comments in `src/sha256.ts` for details.\n\n\nUsage with TypeScript\n---------------------\n\n```typescript\nimport sha256, { Hash, HMAC } from \"fast-sha256\";\n\nsha256(data) // default export is hash\n\nconst h = new HMAC(key); // also Hash and HMAC classes\nconst mac = h.update(data).digest();\n\n// alternatively:\n\nimport * as sha256 from \"fast-sha256\";\n\nsha256.pbkdf2(password, salt, iterations, dkLen); // returns derived key\nsha256.hash(data)\n\nconst hasher = new sha256.Hash();\nhasher.update(data1);\nhasher.update(data2);\nconst result = hasher.digest();\n```\n\n\nTesting and building\n--------------------\n\nInstall development dependencies:\n\n    $ npm install\n\nBuild JavaScript, minified version, and typings:\n\n    $ npm run build\n\nRun tests:\n\n    $ npm test\n\nRun tests on a different source file:\n\n    $ SHA256_SRC=sha256.min.js npm test\n\nRun benchmark:\n\n    $ npm run bench\n\n(or in a browser, open `tests/bench.html`).\n\nLint:\n\n    $ npm run lint\n\n\nNotes\n-----\n\nWhile this implementation is pretty fast compared to previous generation\nimplementations, if you need an even faster one, check out\n[asmCrypto](https://github.com/vibornoff/asmcrypto.js).\n","_attachments":{},"homepage":"https://github.com/dchest/fast-sha256-js#readme","bugs":{"url":"https://github.com/dchest/fast-sha256-js/issues"},"license":"Unlicense"}