[
  {
    "path": ".eslintrc",
    "content": "{\n\t\"root\": true,\n\n\t\"extends\": \"@ljharb\",\n\n\t\"rules\": {\n\t\t\"func-style\": \"off\",\n\t\t\"no-magic-numbers\": \"off\",\n\t},\n\n\t\"overrides\": [\n\t\t{\n\t\t\t\"files\": \"bin.js\",\n\t\t\t\"extends\": \"@ljharb/eslint-config/node/0.4\",\n\t\t\t\"rules\": {\n\t\t\t\t\"func-style\": \"off\",\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\t\"files\": [\n\t\t\t\t\"hash.js\",\n\t\t\t\t\"sha.js\",\n\t\t\t\t\"sha1.js\",\n\t\t\t\t\"sha224.js\",\n\t\t\t\t\"sha256.js\",\n\t\t\t\t\"sha384.js\",\n\t\t\t\t\"sha512.js\",\n\t\t\t\t\"test/vectors.js\",\n\t\t\t],\n\t\t\t\"rules\": {\n\t\t\t\t\"no-underscore-dangle\": \"off\",\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\t\"files\": [\n\t\t\t\t\"sha.js\",\n\t\t\t\t\"sha1.js\",\n\t\t\t\t\"sha224.js\",\n\t\t\t],\n\t\t\t\"rules\": {\n\t\t\t\t\"max-params\": \"off\",\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\t\"files\": [\n\t\t\t\t\"sha256.js\",\n\t\t\t\t\"sha512.js\",\n\t\t\t],\n\t\t\t\"rules\": {\n\t\t\t\t\"max-statements\": \"off\",\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\t\"files\": [\n\t\t\t\t\"sha512.js\",\n\t\t\t],\n\t\t\t\"rules\": {\n\t\t\t\t\"new-cap\": \"warn\",\n\t\t\t\t\"max-lines\": \"off\",\n\t\t\t\t\"max-lines-per-function\": \"off\",\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\t\"files\": \"hash.js\",\n\t\t\t\"globals\": {\n\t\t\t\t\"Uint8Array\": false,\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\t\"files\": \"test/test.js\",\n\t\t\t\"globals\": {\n\t\t\t\t\"Uint16Array\": false,\n\t\t\t},\n\t\t},\n\t],\n}\n"
  },
  {
    "path": ".github/FUNDING.yml",
    "content": "# These are supported funding model platforms\n\ngithub: [ljharb]\npatreon: # Replace with a single Patreon username\nopen_collective: # Replace with a single Open Collective username\nko_fi: # Replace with a single Ko-fi username\ntidelift: npm/sha.js\ncommunity_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry\nliberapay: # Replace with a single Liberapay username\nissuehunt: # Replace with a single IssueHunt username\notechie: # Replace with a single Otechie username\ncustom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']\n"
  },
  {
    "path": ".github/workflows/node-aught.yml",
    "content": "name: 'Tests: node.js < 10'\n\non: [pull_request, push]\n\njobs:\n  tests:\n    uses: ljharb/actions/.github/workflows/node.yml@main\n    with:\n      range: '>= 0.10 < 10'\n      type: minors\n      command: npm run tests-only\n"
  },
  {
    "path": ".github/workflows/node-pretest.yml",
    "content": "name: 'Tests: pretest/posttest'\n\non: [pull_request, push]\n\njobs:\n  tests:\n    uses: ljharb/actions/.github/workflows/pretest.yml@main\n"
  },
  {
    "path": ".github/workflows/node-tens.yml",
    "content": "name: 'Tests: node.js 10 - 20'\n\non: [pull_request, push]\n\npermissions:\n  contents: read\n\njobs:\n  tests:\n    uses: ljharb/actions/.github/workflows/node.yml@main\n    with:\n      range: '>= 10 < 20'\n      type: minors\n      command: npm run tests-only\n"
  },
  {
    "path": ".github/workflows/node-twenties.yml",
    "content": "name: 'Tests: node.js >= 20'\n\non: [pull_request, push]\n\npermissions:\n  contents: read\n\njobs:\n  tests:\n    uses: ljharb/actions/.github/workflows/node.yml@main\n    with:\n      range: '>= 20'\n      type: minors\n      command: npm run tests-only\n"
  },
  {
    "path": ".github/workflows/rebase.yml",
    "content": "name: Automatic Rebase\n\non: [pull_request_target]\n\njobs:\n  _:\n    uses: ljharb/actions/.github/workflows/rebase.yml@main\n    secrets:\n      token: ${{ secrets.GITHUB_TOKEN }}\n"
  },
  {
    "path": ".github/workflows/require-allow-edits.yml",
    "content": "name: Require “Allow Edits”\n\non: [pull_request_target]\n\njobs:\n  _:\n    name: \"Require “Allow Edits”\"\n\n    runs-on: ubuntu-latest\n\n    steps:\n      - uses: ljharb/require-allow-edits@main\n"
  },
  {
    "path": ".gitignore",
    "content": "node_modules\nnpm-debug.log\n\n# Only apps should have lockfiles\nnpm-shrinkwrap.json\npackage-lock.json\nyarn.lock\n\n.npmignore\n"
  },
  {
    "path": ".npmrc",
    "content": "package-lock=false\nallow-same-version=true\nmessage=v%s\n"
  },
  {
    "path": "CHANGELOG.md",
    "content": "# Changelog\n\nAll notable changes to this project will be documented in this file.\n\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)\nand this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).\n\n## [v2.4.12](https://github.com/browserify/sha.js/compare/v2.4.11...v2.4.12) - 2025-07-01\n\n### Commits\n\n- [eslint] switch to eslint [`7acadfb`](https://github.com/browserify/sha.js/commit/7acadfbd3abb558880212b20669fcb09e1aa1c58)\n- [meta] add `auto-changelog` [`b46e711`](https://github.com/browserify/sha.js/commit/b46e7116ebeaa82f34bbf2d7494fff7ef46eab3e)\n- [eslint] fix package.json indentation [`df9d521`](https://github.com/browserify/sha.js/commit/df9d521e16ddf55dc877c43c05706d43c057fad4)\n- [Tests] migrate from travis to GHA [`c43c64a`](https://github.com/browserify/sha.js/commit/c43c64adc6d3607d470538df72338fc02e63bc24)\n- [Fix] support multi-byte wide typed arrays [`f2a258e`](https://github.com/browserify/sha.js/commit/f2a258e9f2d0fcd113bfbaa49706e1ac0d979ba5)\n- [meta] reorder package.json [`d8d77c0`](https://github.com/browserify/sha.js/commit/d8d77c0a729c99593e304047f9d4335b498fd9ed)\n- [meta] add `npmignore` [`35aec35`](https://github.com/browserify/sha.js/commit/35aec35c667b606b2495be3e4186bbe977b9e087)\n- [Tests] avoid console logs [`73e33ae`](https://github.com/browserify/sha.js/commit/73e33ae0ca6bca232627cac7473028e1d218f67e)\n- [Tests] fix tests run in batch [`2629130`](https://github.com/browserify/sha.js/commit/262913006e94616c8cd245ef6bd61bc4410b29e3)\n- [Tests] drop node requirement to 0.10 [`00c7f23`](https://github.com/browserify/sha.js/commit/00c7f234aa3bdbd427ffeb929bacbb05334eb3e9)\n- [Dev Deps] update `buffer`, `hash-test-vectors`, `standard`, `tape`, `typedarray` [`92b5de5`](https://github.com/browserify/sha.js/commit/92b5de5f67472d9f18413d38ad5b9aba29ff4c22)\n- [Tests] drop node requirement to v3 [`9b5eca8`](https://github.com/browserify/sha.js/commit/9b5eca80fd9bb21cf05bdf43ce42661f1bbafeaa)\n- [meta] set engines to `&gt;= 4` [`807084c`](https://github.com/browserify/sha.js/commit/807084c5c0f943459e89838252cafbd175b549b7)\n- Only apps should have lockfiles [`c72789c`](https://github.com/browserify/sha.js/commit/c72789c7a129cf453d44008ba27a88b90ac7989b)\n- [Deps] update `inherits`, `safe-buffer` [`5428cfc`](https://github.com/browserify/sha.js/commit/5428cfc6f7177ad1a41c837b9387308848db96de)\n- [Dev Deps] update `@ljharb/eslint-config` [`2dbe0aa`](https://github.com/browserify/sha.js/commit/2dbe0aab419e90add5032c70c9663b8fc562adb8)\n- update README to reflect LICENSE [`8938256`](https://github.com/browserify/sha.js/commit/8938256dbb2241a7c749e4a399dbaff48cbe8e95)\n- [Dev Deps] add missing peer dep [`d528896`](https://github.com/browserify/sha.js/commit/d52889688ce524e63570f35e448635a29e6dd791)\n- [Dev Deps] remove unused `buffer` dep [`94ca724`](https://github.com/browserify/sha.js/commit/94ca7247f467ef045f41d534708bf7c700e03828)\n\n## [v2.4.11](https://github.com/browserify/sha.js/compare/v2.4.10...v2.4.11) - 2018-03-20\n\n### Merged\n\n- Project is bound by MIT AND BSD-3-Clause licenses. [`#55`](https://github.com/browserify/sha.js/pull/55)\n\n## [v2.4.10](https://github.com/browserify/sha.js/compare/v2.4.9...v2.4.10) - 2018-01-22\n\n### Merged\n\n- Modified greater than uint32 bits data test [`#53`](https://github.com/browserify/sha.js/pull/53)\n- convert lowBits to unsigned in hash.js [`#51`](https://github.com/browserify/sha.js/pull/51)\n\n### Commits\n\n- Simplify bigData allocation [`107141a`](https://github.com/browserify/sha.js/commit/107141ac2c4ca61538e4ad9622cd0c2e21d38095)\n- Modified large file test [`9d037bd`](https://github.com/browserify/sha.js/commit/9d037bd51e84d0d77aa56bb94ed2af2b436d9d66)\n\n## [v2.4.9](https://github.com/browserify/sha.js/compare/v2.4.8...v2.4.9) - 2017-09-25\n\n### Merged\n\n- Buffer: use alloc/allocUnsafe/from instead new [`#50`](https://github.com/browserify/sha.js/pull/50)\n- Change \"new shajs.SHA256()\" to lowercase to make it actually work. [`#48`](https://github.com/browserify/sha.js/pull/48)\n- drop Node &lt;4 [`#46`](https://github.com/browserify/sha.js/pull/46)\n- hash: _update never returns anything [`#45`](https://github.com/browserify/sha.js/pull/45)\n- README: remove typed array comments, re-format support algorithms [`#40`](https://github.com/browserify/sha.js/pull/40)\n- Fix digesting of large data (more than MAX_UINT32 bits) [`#43`](https://github.com/browserify/sha.js/pull/43)\n- use buffer module [`#41`](https://github.com/browserify/sha.js/pull/41)\n\n### Commits\n\n- tests: compare hex, not byte-by-byte (easier debugging) [`5d5a8d8`](https://github.com/browserify/sha.js/commit/5d5a8d882b614060b774e195821a43051f3345b7)\n- hash: remove repeated remainder calculation [`158bc83`](https://github.com/browserify/sha.js/commit/158bc835fbffbbd80f93c97ba0db8e7da7db9c0e)\n- tests: use safe-buffer constructors [`1ac913b`](https://github.com/browserify/sha.js/commit/1ac913b8e043d495c899a1c52258e8e4e970ee95)\n- hash: increase readability of block-by-block hashing [`e9ff865`](https://github.com/browserify/sha.js/commit/e9ff865980615cb8ee2730c6868e7f6781af3c5b)\n- use safe-buffer [`22adba6`](https://github.com/browserify/sha.js/commit/22adba6c745ca703cce356faa988dfe1d84eefa4)\n- Add test for large data [`e963695`](https://github.com/browserify/sha.js/commit/e9636950b88c8e2a0b012c19f4957229d409b04f)\n- tests: formatting [`678c338`](https://github.com/browserify/sha.js/commit/678c3380273516094e32eb79c50e4bce18da6346)\n- Fix digesting of large data [`aee24f1`](https://github.com/browserify/sha.js/commit/aee24f1e0d7fefca68633e6c1be52670fb65a1a5)\n- hash: update never returns anything [`d308cb0`](https://github.com/browserify/sha.js/commit/d308cb0004a0f3e0fcb7a27ea52868384c654c95)\n- hash: rm unnecessary _s state [`388d45e`](https://github.com/browserify/sha.js/commit/388d45ec3a040e7f6ffeecd077498baf32e270e9)\n- npmignore: ignore test/ [`03702a8`](https://github.com/browserify/sha.js/commit/03702a8032fe2bc0b033860bec37c09c1d4af44b)\n- package: bump standard [`8551e53`](https://github.com/browserify/sha.js/commit/8551e53f389cbe3728b21cd62e2df917b4dad9d6)\n\n## [v2.4.8](https://github.com/browserify/sha.js/compare/v2.4.7...v2.4.8) - 2016-11-11\n\n### Commits\n\n- travis: add 6 [`62a582c`](https://github.com/browserify/sha.js/commit/62a582ccebffa04f7b281c680095ffd7a7107e12)\n\n## [v2.4.7](https://github.com/browserify/sha.js/compare/v2.4.6...v2.4.7) - 2016-11-10\n\n### Commits\n\n- re-add bin.js [`30546ca`](https://github.com/browserify/sha.js/commit/30546ca68e683e7fcb4d6c372e48c6b9fda35b4c)\n\n## [v2.4.6](https://github.com/browserify/sha.js/compare/v2.4.5...v2.4.6) - 2016-11-10\n\n### Merged\n\n- use hash-base [`#36`](https://github.com/browserify/sha.js/pull/36)\n- travis: add node 6 [`#38`](https://github.com/browserify/sha.js/pull/38)\n- 2.4.5 [`#35`](https://github.com/browserify/sha.js/pull/35)\n\n### Commits\n\n- update implementations [`aba27f9`](https://github.com/browserify/sha.js/commit/aba27f9132de39dca4089a120b6c66e097fcd865)\n- update tests [`8522be9`](https://github.com/browserify/sha.js/commit/8522be9bc5abc34adf3cf4b17c132471c0f4f80a)\n- remove bin.js [`f7c86a7`](https://github.com/browserify/sha.js/commit/f7c86a70d6a70dd807cce06f811d3cbf9cbebff0)\n- update README.md [`8eec0fb`](https://github.com/browserify/sha.js/commit/8eec0fbf2025cdf9c5d2f8877d3fe3e276dbda88)\n- move shaX to lib directory [`cf2ab1d`](https://github.com/browserify/sha.js/commit/cf2ab1dc9bdd434dfd3afd043f0956894c931ad2)\n- travis: add 6 [`891c962`](https://github.com/browserify/sha.js/commit/891c96228dd4cb9777fbae169e8ee8f2c3dc022c)\n\n## [v2.4.5](https://github.com/browserify/sha.js/compare/v2.4.4...v2.4.5) - 2016-02-26\n\n### Merged\n\n- Improve performace [`#34`](https://github.com/browserify/sha.js/pull/34)\n- Add node v4 and v5 to travis config [`#33`](https://github.com/browserify/sha.js/pull/33)\n\n### Commits\n\n- Update package.json [`2b250d6`](https://github.com/browserify/sha.js/commit/2b250d6358efed8c9476805ccb86e20c63e721a6)\n\n## [v2.4.4](https://github.com/browserify/sha.js/compare/v2.4.3...v2.4.4) - 2015-09-19\n\n### Merged\n\n- inline Sigma functions [`#32`](https://github.com/browserify/sha.js/pull/32)\n\n## [v2.4.3](https://github.com/browserify/sha.js/compare/v2.4.2...v2.4.3) - 2015-09-15\n\n### Merged\n\n- Remove testling [`#31`](https://github.com/browserify/sha.js/pull/31)\n\n### Fixed\n\n- Adds npm badge (resolves #28) [`#28`](https://github.com/browserify/sha.js/issues/28)\n\n### Commits\n\n- fix standard issues [`52659f7`](https://github.com/browserify/sha.js/commit/52659f73bdc9ce1147da010cb303f3f008428498)\n- README: update badge paths [`66a0b4c`](https://github.com/browserify/sha.js/commit/66a0b4c50b3499e2db37c4d1b0545d6536bc2f3b)\n- Update README.md [`ca03356`](https://github.com/browserify/sha.js/commit/ca03356cbf74ea5b57df4d4f5ccc1e5557a75966)\n\n## [v2.4.2](https://github.com/browserify/sha.js/compare/v2.4.1...v2.4.2) - 2015-06-05\n\n### Merged\n\n- Use standard [`#26`](https://github.com/browserify/sha.js/pull/26)\n\n### Commits\n\n- sha*: adhere to standard [`74f5fc4`](https://github.com/browserify/sha.js/commit/74f5fc4741447385f5691cb3140cf716a1288312)\n- tests: adhere to standard [`e6851ca`](https://github.com/browserify/sha.js/commit/e6851ca9bb0843fa90d8eee7d3f7b3f9d1bbe4fb)\n- bin: adhere to standard [`d1a23ab`](https://github.com/browserify/sha.js/commit/d1a23ab987eed4a6b940161693a805fa67c6e16d)\n- vectors: adhere to standard [`5657c76`](https://github.com/browserify/sha.js/commit/5657c76f23e92d268010e0fd5880d5c52014eab2)\n- hexpp: adhere to stnadard [`2aa2707`](https://github.com/browserify/sha.js/commit/2aa27074799df136b6b49cd0cdb272fe39c742a9)\n- tests: remove unused generateCount function [`4a0b095`](https://github.com/browserify/sha.js/commit/4a0b0958e287070efe0bc3d9addff9401e4bbf18)\n- adds standard [`0041dbb`](https://github.com/browserify/sha.js/commit/0041dbbd440c0f2e279c6a965485d1d841db3e9e)\n- index: adhere to standard [`1839fb7`](https://github.com/browserify/sha.js/commit/1839fb715518fb18077e2b02449ad3627efc3ecb)\n- hash: adhere to standard [`1334d89`](https://github.com/browserify/sha.js/commit/1334d89fe96a5854c2871c6352bc6d1a7f843145)\n- package: use standard 4.0.0 [`ace4747`](https://github.com/browserify/sha.js/commit/ace474780c743368934c63df64cf12f556bb86a6)\n- example is sha256 not sha1 [`8eb102b`](https://github.com/browserify/sha.js/commit/8eb102b6c3faa4a87c134644d019e8c8806a5801)\n\n## [v2.4.1](https://github.com/browserify/sha.js/compare/v2.4.0...v2.4.1) - 2015-05-19\n\n### Merged\n\n- Update README.md [`#22`](https://github.com/browserify/sha.js/pull/22)\n\n## [v2.4.0](https://github.com/browserify/sha.js/compare/v2.3.6...v2.4.0) - 2015-04-05\n\n### Commits\n\n- sha0: add implementation [`ca6950d`](https://github.com/browserify/sha.js/commit/ca6950d53c064aa5d767e7166ea29dd0cb61a1b6)\n- document legacyness of sha1 and sha0 [`4563da6`](https://github.com/browserify/sha.js/commit/4563da67ee0e86e4eea55b844c6ec73f677e094a)\n- README: not just SHA1 anymore [`2a67456`](https://github.com/browserify/sha.js/commit/2a67456d5ab2c6197f8314a83ddb4a9dc59ebfd1)\n\n## [v2.3.6](https://github.com/browserify/sha.js/compare/v2.3.5...v2.3.6) - 2015-01-14\n\n### Commits\n\n- transfer to crypto-browserify org [`40f1aa9`](https://github.com/browserify/sha.js/commit/40f1aa960c0e7ddc4dc933013d63df41e6362737)\n\n## [v2.3.5](https://github.com/browserify/sha.js/compare/v2.3.4...v2.3.5) - 2015-01-14\n\n### Commits\n\n- sha512: same branch extraction as #18 [`f985426`](https://github.com/browserify/sha.js/commit/f9854264d841f7138f65eec36010f54043868fdd)\n- sha256: extract branches out [`e5486fd`](https://github.com/browserify/sha.js/commit/e5486fde95542a1f79c568f010810b8c7b9889c4)\n\n## [v2.3.4](https://github.com/browserify/sha.js/compare/v2.3.3...v2.3.4) - 2015-01-13\n\n### Commits\n\n- sha1: use a closure over separate loops [`26a75ec`](https://github.com/browserify/sha.js/commit/26a75eca5f841850a05384d8a3a95e22ee8d9617)\n\n## [v2.3.3](https://github.com/browserify/sha.js/compare/v2.3.2...v2.3.3) - 2015-01-13\n\n### Commits\n\n- sha1: unroll conditionals [`f830142`](https://github.com/browserify/sha.js/commit/f8301422051bd82cdb490881904b4bd418d5049d)\n- sha1: use a closure over seperate loops [`bf46619`](https://github.com/browserify/sha.js/commit/bf46619c437f14c8aec95049fc054a13ee42c779)\n- sha1: inline _ft, _kt functions [`3b32ff2`](https://github.com/browserify/sha.js/commit/3b32ff2b18642d57c069152d0dba2dfdc8f6c3ac)\n\n## [v2.3.2](https://github.com/browserify/sha.js/compare/v2.3.1...v2.3.2) - 2015-01-12\n\n### Commits\n\n- improve sha* code structuring consistency [`d35623d`](https://github.com/browserify/sha.js/commit/d35623d4eddad7bc6f74c6c4f20e59cfc582215d)\n- sha*: avoid unnecessary var declaration separation [`d985016`](https://github.com/browserify/sha.js/commit/d9850165dd29f662ff5c9490f9922a2bc65fec73)\n- sha1: format sha1_kt similar to sha1_ft for clarity [`c18e7eb`](https://github.com/browserify/sha.js/commit/c18e7eb5ea14c7f5bb99f2664b04e132feeff296)\n- adds .gitignore for node_modules [`9dc2814`](https://github.com/browserify/sha.js/commit/9dc2814271d9f119f8b30367d823e72b4f98e1ed)\n\n## [v2.3.1](https://github.com/browserify/sha.js/compare/v2.3.0...v2.3.1) - 2015-01-12\n\n### Commits\n\n- Use inherits module instead of util [`aef9b82`](https://github.com/browserify/sha.js/commit/aef9b82c629f6ebaf346dab15c2a9bd30fb05aa6)\n\n## [v2.3.0](https://github.com/browserify/sha.js/compare/v2.2.7...v2.3.0) - 2014-11-18\n\n### Commits\n\n- clean up factories [`996be1c`](https://github.com/browserify/sha.js/commit/996be1cb6a62a479dfb4758c5c431c6381c226cd)\n- sha224 and 384 [`56694e5`](https://github.com/browserify/sha.js/commit/56694e5db70844f11a6a4082a549339d3b24ea95)\n- add prepublish safety script [`84bde3c`](https://github.com/browserify/sha.js/commit/84bde3cb011f2370034c135727d602522d34e078)\n\n## [v2.2.7](https://github.com/browserify/sha.js/compare/v2.2.6...v2.2.7) - 2014-11-06\n\n### Commits\n\n- use hash-test-vectors module [`526e246`](https://github.com/browserify/sha.js/commit/526e246cd58f108b410eeae3982756acd06c659c)\n\n## [v2.2.6](https://github.com/browserify/sha.js/compare/v2.2.5...v2.2.6) - 2014-09-18\n\n### Commits\n\n- don't use global module [`8734884`](https://github.com/browserify/sha.js/commit/87348845d238ba6d8609f22a0972a438d4fc6ab1)\n- safely check for IntArray32 existance [`e2376fd`](https://github.com/browserify/sha.js/commit/e2376fd5824fa89ad571e0ea666367511d3a02b5)\n\n## [v2.2.5](https://github.com/browserify/sha.js/compare/v2.2.4...v2.2.5) - 2014-09-16\n\n### Commits\n\n- move buffer and typedarray into devdeps [`68797f9`](https://github.com/browserify/sha.js/commit/68797f971f55bcf53014e13d9b83adcc0e113ea0)\n\n## [v2.2.4](https://github.com/browserify/sha.js/compare/v2.2.3...v2.2.4) - 2014-09-16\n\n### Commits\n\n- merge [`7d8b28f`](https://github.com/browserify/sha.js/commit/7d8b28f7627c82ea289e9396d1b93139264e4e1f)\n- Fall back to normal array if no typed arrays [`8ca8dfc`](https://github.com/browserify/sha.js/commit/8ca8dfc025e5b2de4a126235b2f3eb4a1046b2d6)\n- Don't use console.error [`6e0bd2d`](https://github.com/browserify/sha.js/commit/6e0bd2d8f3db4c267fbaebcbd1b542bc03b1e356)\n\n## [v2.2.3](https://github.com/browserify/sha.js/compare/v2.2.2...v2.2.3) - 2014-09-16\n\n### Commits\n\n- fix test [`b4e83fa`](https://github.com/browserify/sha.js/commit/b4e83fa8ef732e90c399fcde5f55f8417d623524)\n\n## [v2.2.2](https://github.com/browserify/sha.js/compare/v2.2.1...v2.2.2) - 2014-09-16\n\n### Merged\n\n- Copyright to contributors [`#10`](https://github.com/browserify/sha.js/pull/10)\n\n### Commits\n\n- LICENSE: update to include all contributors [`ac05b4d`](https://github.com/browserify/sha.js/commit/ac05b4d8bfca0c67edd8f20808d61b1aea980ebd)\n\n## [v2.2.1](https://github.com/browserify/sha.js/compare/v2.2.0...v2.2.1) - 2014-09-16\n\n### Commits\n\n- document implemented hashes [`d123901`](https://github.com/browserify/sha.js/commit/d123901fe28148dce55637ed7942cd4953c9f448)\n\n## [v2.2.0](https://github.com/browserify/sha.js/compare/v2.1.8...v2.2.0) - 2014-09-16\n\n### Commits\n\n- sha512: add implementation [`3e19416`](https://github.com/browserify/sha.js/commit/3e1941651b20741579c4adfcf69aa0bd607ef932)\n- fixtures: remove unused md4 data [`13e43c5`](https://github.com/browserify/sha.js/commit/13e43c59a7109d31147f45a6619af6f8bfa11923)\n- get tests working correctly [`01e393f`](https://github.com/browserify/sha.js/commit/01e393fbc4253ce82cf1f57f10c76b087a4b7787)\n- remove utils.js [`418d59d`](https://github.com/browserify/sha.js/commit/418d59d40315a50972244ab4103c6d2a59dd86a2)\n- fixtures: cleanup of vectors generation [`40f50cc`](https://github.com/browserify/sha.js/commit/40f50ccc29db3f689a04ebfecac2753c895398be)\n- sha: jshint cleanup [`a04fae0`](https://github.com/browserify/sha.js/commit/a04fae03acdfb3bbfc7fbf15d928244364b5083a)\n- hash: adhere to NIST paper properly [`fb2e39f`](https://github.com/browserify/sha.js/commit/fb2e39f86ce80948b697ac7d0d5f9b7f99c0672c)\n- hash: increase verbosity [`b431a1a`](https://github.com/browserify/sha.js/commit/b431a1a24d5d37f856592aabe4593196d60b3b7f)\n- hash: use update() argument instead [`0703b9d`](https://github.com/browserify/sha.js/commit/0703b9d38e816d71794a6604060a30e26072b6b7)\n- sha: remove unused POOL [`0299989`](https://github.com/browserify/sha.js/commit/02999896280b859d5526820716c737ecbc46d0f6)\n- README: add newline before testling badge [`a184d68`](https://github.com/browserify/sha.js/commit/a184d680dae744e7a6adfb73839c3feb6bd5f840)\n- LICENSE: update to include all contributors [`edf48c3`](https://github.com/browserify/sha.js/commit/edf48c3b12638cafd509d51b84c39d63f6f00d3b)\n- index: remove unused export [`b4de630`](https://github.com/browserify/sha.js/commit/b4de630c9e2092072d0baa5a0a5e93d00ce43c44)\n\n## [v2.1.8](https://github.com/browserify/sha.js/compare/v2.1.7...v2.1.8) - 2014-08-31\n\n### Merged\n\n- check if DataView exist before using instanceof check [`#6`](https://github.com/browserify/sha.js/pull/6)\n\n## [v2.1.7](https://github.com/browserify/sha.js/compare/v2.1.6...v2.1.7) - 2014-07-24\n\n### Commits\n\n- check for streaming updates [`4fc22d2`](https://github.com/browserify/sha.js/commit/4fc22d239c87d62155292ed7ccef2e36819bd7a6)\n- also test with 3 partial updates [`37981e0`](https://github.com/browserify/sha.js/commit/37981e0b751e4cbb0631472aa19f5facb220cc31)\n- Fix streaming updates (limit writing so it doesn't go over block size) [`50b8ddb`](https://github.com/browserify/sha.js/commit/50b8ddb4a5ec8fdaef7c51a01540b237e14a9b5e)\n\n## [v2.1.6](https://github.com/browserify/sha.js/compare/v2.1.5...v2.1.6) - 2014-07-19\n\n### Merged\n\n- Fixes disparity between 'SHA1' working on node but failing in browser [`#3`](https://github.com/browserify/sha.js/pull/3)\n\n## [v2.1.5](https://github.com/browserify/sha.js/compare/v2.1.4...v2.1.5) - 2014-06-07\n\n### Commits\n\n- use buffer/ [`23ee33f`](https://github.com/browserify/sha.js/commit/23ee33f8d9ebd5226f6f2fcc6dfcbfddda18af17)\n\n## v2.1.4 - 2014-06-07\n\n### Commits\n\n- add tests from NIST [`422aa1f`](https://github.com/browserify/sha.js/commit/422aa1fccbd4efc5d2a72fbe7404971c45348c16)\n- code to prepare nist-vectors.json [`e799a6f`](https://github.com/browserify/sha.js/commit/e799a6f8b15a9a3796dce295d9485defc7246568)\n- inject Buffer dep, so can test with different implementations [`3d89958`](https://github.com/browserify/sha.js/commit/3d8995821e8da1cbf85114589e15843b371b9285)\n- initial [`c1cabff`](https://github.com/browserify/sha.js/commit/c1cabff65dc811bd9c7e7530aab90db3b1080f04)\n- expose createHash, like node's crypto [`41a1c53`](https://github.com/browserify/sha.js/commit/41a1c531c7947f1bc16ff33ba8dc9335a1a932fd)\n- update stuff, still one problem with finalizing some lengths... [`d91aabb`](https://github.com/browserify/sha.js/commit/d91aabb27b0320708aa19943626029510aab3cbb)\n- inject Buffer dep into hash [`21df559`](https://github.com/browserify/sha.js/commit/21df55938c274a75d5d04dfd7a4c9abe41d0ce7c)\n- refactor tests [`fa6f893`](https://github.com/browserify/sha.js/commit/fa6f893ea0459caa71cd603f244e35f11a617b3b)\n- this is quite a bit faster [`84379b3`](https://github.com/browserify/sha.js/commit/84379b3651daca535cbc9aba987563c26d84816f)\n- implement sha256! [`70a6101`](https://github.com/browserify/sha.js/commit/70a6101ba6c6a4ae2bf6b89a9feae41c2bcd9559)\n- tidy [`dce6d28`](https://github.com/browserify/sha.js/commit/dce6d28d15672d8c95cfc855b8071398b8aaca67)\n- move of string stuff, use dataview [`55c7003`](https://github.com/browserify/sha.js/commit/55c7003b99880e54bbd709138028f66c94f51c64)\n- update to buffer incrementally [`8cbcade`](https://github.com/browserify/sha.js/commit/8cbcade0875305d3005b97b94b7cdaa61cb93f34)\n- refactor, to use buffers in tests [`8e7119b`](https://github.com/browserify/sha.js/commit/8e7119b5c079f51e5c24bfa2d5c3e25536e8b677)\n- this is a little faster, but not much... [`55dfc90`](https://github.com/browserify/sha.js/commit/55dfc909269e7b21fb748a5bb594ba3b92a3e03e)\n- refactor util functions out [`283f192`](https://github.com/browserify/sha.js/commit/283f1923bdf0bfe48167f240062071cdd2340f78)\n- more encodings [`e5071ca`](https://github.com/browserify/sha.js/commit/e5071ca79c80b4d10a2fac860026cdaa291aee27)\n- more tests [`655a7be`](https://github.com/browserify/sha.js/commit/655a7be9914298ad63ea77ba4c85dc34ed5f7f9b)\n- deal with endianness [`1331b1f`](https://github.com/browserify/sha.js/commit/1331b1f4a1a449c0314cdaec9b0c363a8d8357dd)\n- remove custom encoding stuff - just use buffer [`b464d5b`](https://github.com/browserify/sha.js/commit/b464d5bf5cd34de2cb294108179e6967bf3aef28)\n- add more encodings to write [`19ce345`](https://github.com/browserify/sha.js/commit/19ce345a06206dda644f21c602aa326597998822)\n- separate basic stuff into Hash function [`fe59f0c`](https://github.com/browserify/sha.js/commit/fe59f0cb949fa9e4b5f162f54ebe7b3312b1fc0f)\n- experiment using node buffers [`27f6767`](https://github.com/browserify/sha.js/commit/27f676750b9e6e042d2d2ea11ef2c4196f3b417c)\n- Several Memory Related Performance Improvements [`9b9badc`](https://github.com/browserify/sha.js/commit/9b9badccae5585d0a1f563ce171635404f97108d)\n- tidy [`51c40fa`](https://github.com/browserify/sha.js/commit/51c40fa0c632c5114b574199063f8366621eaaa8)\n- use toggle to compare with forge, but inlining makes this the same perf, although removing safe_add improved perf a lot [`15f80b9`](https://github.com/browserify/sha.js/commit/15f80b9e7d1677962f4f0f930e13e0d90de2ef13)\n- remove unused utils [`a331a15`](https://github.com/browserify/sha.js/commit/a331a1513efa3bc2cdebc955fa3832ff6306d34f)\n- tests for Hash [`417c298`](https://github.com/browserify/sha.js/commit/417c29858090b53b74d91f91b8f8e830dc0384a8)\n- for some reason, this is MUCH faster! [`91649a6`](https://github.com/browserify/sha.js/commit/91649a61d6fe8ab2b1f785c1833efa89feeff3b0)\n- leaking globals [`7e94cf7`](https://github.com/browserify/sha.js/commit/7e94cf7758ebf70f4c876518495445e971e2eff0)\n- delete fakebuffer.js [`e42d66c`](https://github.com/browserify/sha.js/commit/e42d66cf5190a8a0c45e19231ddcd2ef983f1380)\n- use bigendian [`f633b94`](https://github.com/browserify/sha.js/commit/f633b94aef9504607b14a2c2805b1e491f3e61b8)\n- fix digest [`fdee30b`](https://github.com/browserify/sha.js/commit/fdee30be69cc3fa58a25ae3e32d629251e0a005d)\n- tidy [`6f03926`](https://github.com/browserify/sha.js/commit/6f0392697e73f03c8900ccebd4a7d706c77bdea9)\n- test incremental update [`d11e6f6`](https://github.com/browserify/sha.js/commit/d11e6f69f4be8d2d1c89f8492d4de2cf2b42027b)\n- fake buffer, based on DataView [`71a31b6`](https://github.com/browserify/sha.js/commit/71a31b642d3212076dbd9e54cf6b6072b03c61ad)\n- command to hash a large file [`618f16d`](https://github.com/browserify/sha.js/commit/618f16de80ee4b499ab6a493e88845f161dbb0dc)\n- { on end of line [`8c1a1a7`](https://github.com/browserify/sha.js/commit/8c1a1a743e740df2e04fa4a9d97a9aea5831529d)\n- hammer in a piton, incase I fall off this cliff [`0a211b2`](https://github.com/browserify/sha.js/commit/0a211b2b0abda6252f59f6f3892df1411670c72f)\n- basic tests for encoding [`dece220`](https://github.com/browserify/sha.js/commit/dece220424b1d2776a88b35f28d46001e13b10d7)\n- tests for hex encoding [`f860f65`](https://github.com/browserify/sha.js/commit/f860f65c173ff92b07643ae55a76516de0b1dded)\n- fix fakebuffer [`c421953`](https://github.com/browserify/sha.js/commit/c421953c135fbb1fa3b46df0c3710bc39e50ac4d)\n- remove encoding utils [`b0a9d4b`](https://github.com/browserify/sha.js/commit/b0a9d4bc153bd8ffd23d85e5c6a51ac8d7f81d51)\n- tidy [`72b825b`](https://github.com/browserify/sha.js/commit/72b825b5a071a37de7bf00f2701bc0af66618ec2)\n- tests for fakebuffer [`391fc9f`](https://github.com/browserify/sha.js/commit/391fc9f84988ebc32e8e14687568d8a2418fa34f)\n- avoid unnecessary overwrite, 5% improvement [`d061547`](https://github.com/browserify/sha.js/commit/d0615475d9d23ab97814f55fab2e7c6db7adb9bb)\n- use dataview [`04b9dee`](https://github.com/browserify/sha.js/commit/04b9deefaf8b1646bc9191f6d955e50c36441da0)\n- update vector test to cover sha256 [`aa0d4fa`](https://github.com/browserify/sha.js/commit/aa0d4faef9f05aedf388bf9ca0e5012c4fc14326)\n- readme [`6a9992a`](https://github.com/browserify/sha.js/commit/6a9992a77747286d059f0335d5358a013cd0096b)\n- toHex supports strings and buffers [`9e17355`](https://github.com/browserify/sha.js/commit/9e173551bba96b7a6d395311948a4887e1461e5e)\n- remove redundant tests [`9c701f4`](https://github.com/browserify/sha.js/commit/9c701f4b390b25fd154f85f6b8a5b187542bc463)\n- testling [`3515f2f`](https://github.com/browserify/sha.js/commit/3515f2f8c958e3b598a1b6be87ba33cd70ae1591)\n- support hex encoding [`b1488b5`](https://github.com/browserify/sha.js/commit/b1488b5dd416c4525e6bc817d7b87da27b275c94)\n- remove logging [`ce7d53a`](https://github.com/browserify/sha.js/commit/ce7d53af357062def163f895aa5386e3f6b7e605)\n- the working buffer can use system default endianness [`3da2747`](https://github.com/browserify/sha.js/commit/3da27472f74929d223c9ca47c59c219748989981)\n- use dataview [`bdba2ec`](https://github.com/browserify/sha.js/commit/bdba2ecbd5877d4e2db012eaaa489467a08fb143)\n- support binary encoding [`7b0cae7`](https://github.com/browserify/sha.js/commit/7b0cae71407ec363dc0150c1676fcd0a96a7ea48)\n- refactor tests, for createHash [`f424197`](https://github.com/browserify/sha.js/commit/f4241979e140b8317abeb84773136e92d8811ca6)\n- Int32 is a little faster than Uint32 [`c61542e`](https://github.com/browserify/sha.js/commit/c61542e06a4c06245aca3860aa36d97e250f08b9)\n- simplify bit manipulations [`7e2fc4c`](https://github.com/browserify/sha.js/commit/7e2fc4c06350b35c83d7336c4c36b0acef274373)\n- tidy [`e34e8b5`](https://github.com/browserify/sha.js/commit/e34e8b540202f4f548a70d44600287f9e2bd6e82)\n- load browserify.js to force native-buffer-browserify [`fd5e58a`](https://github.com/browserify/sha.js/commit/fd5e58a4caa4223fe8f69614d137f219cc11d640)\n- tidyup [`12e401b`](https://github.com/browserify/sha.js/commit/12e401b47e7f62ac47edea70efa2db4a044df015)\n- this tiny change make it 11% faster on 174mb file! [`f58c321`](https://github.com/browserify/sha.js/commit/f58c3212e40b9c65dc81dcf4765052d4181cf96d)\n- support multiple encodings [`36506c6`](https://github.com/browserify/sha.js/commit/36506c6ded807f9a23014b4eb2385ec8ae5d681b)\n- tidy [`2c664aa`](https://github.com/browserify/sha.js/commit/2c664aadf9008111c8f19d30f0b8125d0133b79c)\n- update hash tests - for some reason, t.deepEqual doesn't work well on buffers? [`8e8e854`](https://github.com/browserify/sha.js/commit/8e8e8547612af4cb628400be0933edeb856f28a5)\n- rename to Sha1 [`6620d1a`](https://github.com/browserify/sha.js/commit/6620d1a9a8598e7cf2799e72a786f5bafbaef7a2)\n- tidy [`2313658`](https://github.com/browserify/sha.js/commit/2313658f0330b3b851ba55ada7f9ab8a11734802)\n- use bops for encoding/decoding [`48d1eb9`](https://github.com/browserify/sha.js/commit/48d1eb9eeee33c2bf55aaae4112ffdf236e20fa2)\n- handle large updates all at once, to pass NIST tests [`f2adc77`](https://github.com/browserify/sha.js/commit/f2adc77e49c74d34d8d6715f8b172f3d898bbe32)\n- use bops [`5167411`](https://github.com/browserify/sha.js/commit/51674113e9dc35a54d1ec564c51374ad869252b9)\n- use fakebuffer instead of buffer [`a6398fe`](https://github.com/browserify/sha.js/commit/a6398fe0582e88aa837a6058494ff7a9c783bd23)\n- remove final, and force to Uint8Array [`c42eb76`](https://github.com/browserify/sha.js/commit/c42eb76a6afb318202fd63aff4e6de2145fe4d51)\n- todo [`52ef73e`](https://github.com/browserify/sha.js/commit/52ef73e7db22937a2f47ad69e4c4e75fb03215a1)\n- remove debugging stuff [`afeb954`](https://github.com/browserify/sha.js/commit/afeb95445f1aff601dba5436ef6024c818d5ed06)\n- use bops@0.1.1 [`ccb7eaf`](https://github.com/browserify/sha.js/commit/ccb7eaf1f6e65d590fb4d56797f342e1139a643b)\n- convert to string [`abe5373`](https://github.com/browserify/sha.js/commit/abe5373aaf0742cf10dc82b879c0848e22a611fe)\n- work around tape/ff [`b95d57c`](https://github.com/browserify/sha.js/commit/b95d57c596a455b3a7b9ad8de95e4374a7d84cf8)\n- remove bops [`4d9fb4d`](https://github.com/browserify/sha.js/commit/4d9fb4d8fd8332d69b055e9d1dd1ba5aad5ebb8c)\n- this made no difference [`0a0ee38`](https://github.com/browserify/sha.js/commit/0a0ee38c5fead881b3bdb96c9b47a59b62451b13)\n- drop support for legacy versions [`e7c530f`](https://github.com/browserify/sha.js/commit/e7c530f19a33aac5768e50dffc8fc93df4070af3)\n- a few more test cases [`48ce51b`](https://github.com/browserify/sha.js/commit/48ce51b50b62bb53bd6effdfe42be232f31ffa52)\n- use buffer methods [`6a572d2`](https://github.com/browserify/sha.js/commit/6a572d2a27e20c990f8a32d7c39606a0571f9fe7)\n- getter for buffer length [`56c1e35`](https://github.com/browserify/sha.js/commit/56c1e35583aa53b1aaaff68d43a4bf4a0c206eea)\n- more debuging [`f1c9d10`](https://github.com/browserify/sha.js/commit/f1c9d104d188fbc5ff447a8dc7976400646d3ffb)\n- HAHA IT WORKS [`ee95185`](https://github.com/browserify/sha.js/commit/ee9518599957a64d46d8d45aeaae649ec85641c9)\n- test coverage for binary encoding [`96e417c`](https://github.com/browserify/sha.js/commit/96e417cd12df156f6f0d3608bdd62ef9d661c41d)\n- set debug mode to show time elapsed [`36d4639`](https://github.com/browserify/sha.js/commit/36d46393bde62248e5949b1954b61a96e7220c1c)\n- interpret utf-8 as utf8 [`53bd808`](https://github.com/browserify/sha.js/commit/53bd8080ed929d408856b762a43076b1cad19584)\n- use browserify edge case to get browser version of core module in node [`657c0a9`](https://github.com/browserify/sha.js/commit/657c0a94c914dee1a473b21f1f3c736a5e715a45)\n- native-buffer-browserify -&gt; buffer [`c6a2777`](https://github.com/browserify/sha.js/commit/c6a2777e3ec85de16215f79171fbf2b561556b17)\n- do not run test/test.js in the browser, it depends on node.js [`d1d4ac8`](https://github.com/browserify/sha.js/commit/d1d4ac8d27ef65c3fb1dac6b7ef612fabceeea26)\n- compute correct length for binary string [`c616d74`](https://github.com/browserify/sha.js/commit/c616d7435493c67d399954d8b5673691b5405e83)\n- tidy [`d176073`](https://github.com/browserify/sha.js/commit/d176073dbba34810b86e656dac3a268b438abafe)\n- this is twice as fast! turns out creating DataViews is quite slow! /cc @feross [`3ba9a1f`](https://github.com/browserify/sha.js/commit/3ba9a1fe2c33cc4e88ff953ba5c5544d4be311d1)\n- use _blockLength property [`fdf1030`](https://github.com/browserify/sha.js/commit/fdf10309e4334347e8f668d6ec6d25ea16856f8e)\n- allow subclass to give hash by _hash method [`d47673b`](https://github.com/browserify/sha.js/commit/d47673bc4b2b66f46f0eec342f5e424f5147c48d)\n- use my toHex [`76ffe66`](https://github.com/browserify/sha.js/commit/76ffe66ba119e9e8fc88d6a5b5dcd5ffabf2a9da)\n- didin't work [`254a4e8`](https://github.com/browserify/sha.js/commit/254a4e8c3e4fe79c8ce4cacd23a91426e9d8f32f)\n- always run all tests [`18f39f8`](https://github.com/browserify/sha.js/commit/18f39f8e96ddebd86d32604b55c388e0c72306e1)\n- remove hexpp [`e7f3030`](https://github.com/browserify/sha.js/commit/e7f30308c64bfc5f00a9b8ccf4c17ae65a3ddc55)\n- make installable as a command [`f6842dd`](https://github.com/browserify/sha.js/commit/f6842dde37f0b37042e513fc63d214989417fff4)\n- 0.11 is not working... [`a6aacc6`](https://github.com/browserify/sha.js/commit/a6aacc66f417ee17a4363cc1d20350bfa7a682cc)\n"
  },
  {
    "path": "LICENSE",
    "content": "Copyright (c) 2013-2018 sha.js contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n\nCopyright (c) 1998 - 2009, Paul Johnston & Contributors\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\nRedistributions of source code must retain the above copyright notice, this\nlist of conditions and the following disclaimer.\n\nRedistributions in binary form must reproduce the above copyright notice, this\nlist of conditions and the following disclaimer in the documentation and/or\nother materials provided with the distribution.\n\nNeither the name of the author nor the names of its contributors may be used to\nendorse or promote products derived from this software without specific prior\nwritten permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\nANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n"
  },
  {
    "path": "README.md",
    "content": "# sha.js\n[![NPM Package](https://img.shields.io/npm/v/sha.js.svg?style=flat-square)](https://www.npmjs.org/package/sha.js)\n[![Build Status](https://img.shields.io/travis/crypto-browserify/sha.js.svg?branch=master&style=flat-square)](https://travis-ci.org/crypto-browserify/sha.js)\n[![Dependency status](https://img.shields.io/david/crypto-browserify/sha.js.svg?style=flat-square)](https://david-dm.org/crypto-browserify/sha.js#info=dependencies)\n\n[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)\n\nNode style `SHA` on pure JavaScript.\n\n```js\nvar shajs = require('sha.js')\n\nconsole.log(shajs('sha256').update('42').digest('hex'))\n// => 73475cb40a568e8da8a045ced110137e159f890ac4da883b6b17dc651b3a8049\nconsole.log(new shajs.sha256().update('42').digest('hex'))\n// => 73475cb40a568e8da8a045ced110137e159f890ac4da883b6b17dc651b3a8049\n\nvar sha256stream = shajs('sha256')\nsha256stream.end('42')\nconsole.log(sha256stream.read().toString('hex'))\n// => 73475cb40a568e8da8a045ced110137e159f890ac4da883b6b17dc651b3a8049\n```\n\n## supported hashes\n`sha.js` currently implements:\n\n  - SHA (SHA-0) -- **legacy, do not use in new systems**\n  - SHA-1 -- **legacy, do not use in new systems**\n  - SHA-224\n  - SHA-256\n  - SHA-384\n  - SHA-512\n\n\n## Not an actual stream\nNote, this doesn't actually implement a stream, but wrapping this in a stream is trivial.\nIt does update incrementally, so you can hash things larger than RAM, as it uses a constant amount of memory (except when using base64 or utf8 encoding, see code comments).\n\n\n## Acknowledgements\nThis work is derived from Paul Johnston's [A JavaScript implementation of the Secure Hash Algorithm](http://pajhome.org.uk/crypt/md5/sha1.html).\n\n\n## LICENSE [MIT AND BSD-3-Clause](LICENSE)\n"
  },
  {
    "path": "bin.js",
    "content": "#! /usr/bin/env node\n\n'use strict';\n\nvar createHash = require('./browserify');\nvar argv = process.argv.slice(2);\n\nfunction pipe(algorithm, s) {\n\tvar start = Date.now();\n\tvar hash = createHash(algorithm || 'sha1');\n\n\ts.on('data', function (data) {\n\t\thash.update(data);\n\t});\n\n\ts.on('end', function () {\n\t\tif (process.env.DEBUG) {\n\t\t\tconsole.log(hash.digest('hex'), Date.now() - start);\n\t\t} else {\n\t\t\tconsole.log(hash.digest('hex'));\n\t\t}\n\t});\n}\n\nfunction usage() {\n\tconsole.error('sha.js [algorithm=sha1] [filename] # hash filename with algorithm');\n\tconsole.error('input | sha.js [algorithm=sha1]    # hash stdin with algorithm');\n\tconsole.error('sha.js --help                      # display this message');\n}\n\nif (!process.stdin.isTTY) {\n\tpipe(argv[0], process.stdin);\n} else if (argv.length) {\n\tif ((/--help|-h/).test(argv[0])) {\n\t\tusage();\n\t} else {\n\t\tvar filename = argv.pop();\n\t\tvar algorithm = argv.pop();\n\t\t// eslint-disable-next-line global-require\n\t\tpipe(algorithm, require('fs').createReadStream(filename));\n\t}\n} else {\n\tusage();\n}\n"
  },
  {
    "path": "hash.js",
    "content": "'use strict';\n\nvar Buffer = require('safe-buffer').Buffer;\nvar toBuffer = require('to-buffer');\n\n// prototype class for hash functions\nfunction Hash(blockSize, finalSize) {\n\tthis._block = Buffer.alloc(blockSize);\n\tthis._finalSize = finalSize;\n\tthis._blockSize = blockSize;\n\tthis._len = 0;\n}\n\nHash.prototype.update = function (data, enc) {\n\t/* eslint no-param-reassign: 0 */\n\tdata = toBuffer(data, enc || 'utf8');\n\n\tvar block = this._block;\n\tvar blockSize = this._blockSize;\n\tvar length = data.length;\n\tvar accum = this._len;\n\n\tfor (var offset = 0; offset < length;) {\n\t\tvar assigned = accum % blockSize;\n\t\tvar remainder = Math.min(length - offset, blockSize - assigned);\n\n\t\tfor (var i = 0; i < remainder; i++) {\n\t\t\tblock[assigned + i] = data[offset + i];\n\t\t}\n\n\t\taccum += remainder;\n\t\toffset += remainder;\n\n\t\tif ((accum % blockSize) === 0) {\n\t\t\tthis._update(block);\n\t\t}\n\t}\n\n\tthis._len += length;\n\treturn this;\n};\n\nHash.prototype.digest = function (enc) {\n\tvar rem = this._len % this._blockSize;\n\n\tthis._block[rem] = 0x80;\n\n\t/*\n\t * zero (rem + 1) trailing bits, where (rem + 1) is the smallest\n\t * non-negative solution to the equation (length + 1 + (rem + 1)) === finalSize mod blockSize\n\t */\n\tthis._block.fill(0, rem + 1);\n\n\tif (rem >= this._finalSize) {\n\t\tthis._update(this._block);\n\t\tthis._block.fill(0);\n\t}\n\n\tvar bits = this._len * 8;\n\n\t// uint32\n\tif (bits <= 0xffffffff) {\n\t\tthis._block.writeUInt32BE(bits, this._blockSize - 4);\n\n\t\t// uint64\n\t} else {\n\t\tvar lowBits = (bits & 0xffffffff) >>> 0;\n\t\tvar highBits = (bits - lowBits) / 0x100000000;\n\n\t\tthis._block.writeUInt32BE(highBits, this._blockSize - 8);\n\t\tthis._block.writeUInt32BE(lowBits, this._blockSize - 4);\n\t}\n\n\tthis._update(this._block);\n\tvar hash = this._hash();\n\n\treturn enc ? hash.toString(enc) : hash;\n};\n\nHash.prototype._update = function () {\n\tthrow new Error('_update must be implemented by subclass');\n};\n\nmodule.exports = Hash;\n"
  },
  {
    "path": "index.js",
    "content": "'use strict';\n\nmodule.exports = function SHA(algorithm) {\n\tvar alg = algorithm.toLowerCase();\n\n\tvar Algorithm = module.exports[alg];\n\tif (!Algorithm) {\n\t\tthrow new Error(alg + ' is not supported (we accept pull requests)');\n\t}\n\n\treturn new Algorithm();\n};\n\nmodule.exports.sha = require('./sha');\nmodule.exports.sha1 = require('./sha1');\nmodule.exports.sha224 = require('./sha224');\nmodule.exports.sha256 = require('./sha256');\nmodule.exports.sha384 = require('./sha384');\nmodule.exports.sha512 = require('./sha512');\n"
  },
  {
    "path": "package.json",
    "content": "{\n\t\"name\": \"sha.js\",\n\t\"description\": \"Streamable SHA hashes in pure javascript\",\n\t\"version\": \"2.4.12\",\n\t\"repository\": {\n\t\t\"type\": \"git\",\n\t\t\"url\": \"git://github.com/crypto-browserify/sha.js.git\"\n\t},\n\t\"bin\": \"./bin.js\",\n\t\"scripts\": {\n\t\t\"prepack\": \"npmignore --auto --commentLines=autogenerated\",\n\t\t\"lint\": \"eslint --ext=js,mjs .\",\n\t\t\"pretest\": \"npm run lint\",\n\t\t\"test\": \"npm run tests-only\",\n\t\t\"tests-only\": \"tape 'test/**/*.js'\",\n\t\t\"posttest\": \"npx npm@'>= 10.2' audit --production\",\n\t\t\"version\": \"auto-changelog && git add CHANGELOG.md\",\n\t\t\"postversion\": \"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \\\"v$(node -e \\\"console.log(require('./package.json').version)\\\")\\\"\"\n\t},\n\t\"license\": \"(MIT AND BSD-3-Clause)\",\n\t\"author\": \"Dominic Tarr <dominic.tarr@gmail.com> (dominictarr.com)\",\n\t\"funding\": {\n\t\t\"url\": \"https://github.com/sponsors/ljharb\"\n\t},\n\t\"homepage\": \"https://github.com/crypto-browserify/sha.js\",\n\t\"dependencies\": {\n\t\t\"inherits\": \"^2.0.4\",\n\t\t\"safe-buffer\": \"^5.2.1\",\n\t\t\"to-buffer\": \"^1.2.2\"\n\t},\n\t\"devDependencies\": {\n\t\t\"@ljharb/eslint-config\": \"^21.2.0\",\n\t\t\"auto-changelog\": \"^2.5.0\",\n\t\t\"encoding\": \"^0.1.13\",\n\t\t\"eslint\": \"=8.8.0\",\n\t\t\"hash-test-vectors\": \"^1.3.2\",\n\t\t\"npmignore\": \"^0.3.1\",\n\t\t\"tape\": \"^5.9.0\",\n\t\t\"typedarray\": \"^0.0.7\"\n\t},\n\t\"auto-changelog\": {\n\t\t\"output\": \"CHANGELOG.md\",\n\t\t\"template\": \"keepachangelog\",\n\t\t\"unreleased\": false,\n\t\t\"commitLimit\": false,\n\t\t\"backfillLimit\": false,\n\t\t\"hideCredit\": true\n\t},\n\t\"publishConfig\": {\n\t\t\"ignore\": [\n\t\t\t\".github/workflows\",\n\t\t\t\".github\"\n\t\t]\n\t},\n\t\"engines\": {\n\t\t\"node\": \">= 0.10\"\n\t}\n}\n"
  },
  {
    "path": "sha.js",
    "content": "'use strict';\n\n/*\n * A JavaScript implementation of the Secure Hash Algorithm, SHA-0, as defined\n * in FIPS PUB 180-1\n * This source code is derived from sha1.js of the same repository.\n * The difference between SHA-0 and SHA-1 is just a bitwise rotate left\n * operation was added.\n */\n\nvar inherits = require('inherits');\nvar Hash = require('./hash');\nvar Buffer = require('safe-buffer').Buffer;\n\nvar K = [\n\t0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0\n];\n\nvar W = new Array(80);\n\nfunction Sha() {\n\tthis.init();\n\tthis._w = W;\n\n\tHash.call(this, 64, 56);\n}\n\ninherits(Sha, Hash);\n\nSha.prototype.init = function () {\n\tthis._a = 0x67452301;\n\tthis._b = 0xefcdab89;\n\tthis._c = 0x98badcfe;\n\tthis._d = 0x10325476;\n\tthis._e = 0xc3d2e1f0;\n\n\treturn this;\n};\n\nfunction rotl5(num) {\n\treturn (num << 5) | (num >>> 27);\n}\n\nfunction rotl30(num) {\n\treturn (num << 30) | (num >>> 2);\n}\n\nfunction ft(s, b, c, d) {\n\tif (s === 0) {\n\t\treturn (b & c) | (~b & d);\n\t}\n\tif (s === 2) {\n\t\treturn (b & c) | (b & d) | (c & d);\n\t}\n\treturn b ^ c ^ d;\n}\n\nSha.prototype._update = function (M) {\n\tvar w = this._w;\n\n\tvar a = this._a | 0;\n\tvar b = this._b | 0;\n\tvar c = this._c | 0;\n\tvar d = this._d | 0;\n\tvar e = this._e | 0;\n\n\tfor (var i = 0; i < 16; ++i) {\n\t\tw[i] = M.readInt32BE(i * 4);\n\t}\n\tfor (; i < 80; ++i) {\n\t\tw[i] = w[i - 3] ^ w[i - 8] ^ w[i - 14] ^ w[i - 16];\n\t}\n\n\tfor (var j = 0; j < 80; ++j) {\n\t\tvar s = ~~(j / 20);\n\t\tvar t = (rotl5(a) + ft(s, b, c, d) + e + w[j] + K[s]) | 0;\n\n\t\te = d;\n\t\td = c;\n\t\tc = rotl30(b);\n\t\tb = a;\n\t\ta = t;\n\t}\n\n\tthis._a = (a + this._a) | 0;\n\tthis._b = (b + this._b) | 0;\n\tthis._c = (c + this._c) | 0;\n\tthis._d = (d + this._d) | 0;\n\tthis._e = (e + this._e) | 0;\n};\n\nSha.prototype._hash = function () {\n\tvar H = Buffer.allocUnsafe(20);\n\n\tH.writeInt32BE(this._a | 0, 0);\n\tH.writeInt32BE(this._b | 0, 4);\n\tH.writeInt32BE(this._c | 0, 8);\n\tH.writeInt32BE(this._d | 0, 12);\n\tH.writeInt32BE(this._e | 0, 16);\n\n\treturn H;\n};\n\nmodule.exports = Sha;\n"
  },
  {
    "path": "sha1.js",
    "content": "'use strict';\n\n/*\n * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined\n * in FIPS PUB 180-1\n * Version 2.1a Copyright Paul Johnston 2000 - 2002.\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for details.\n */\n\nvar inherits = require('inherits');\nvar Hash = require('./hash');\nvar Buffer = require('safe-buffer').Buffer;\n\nvar K = [\n\t0x5a827999, 0x6ed9eba1, 0x8f1bbcdc | 0, 0xca62c1d6 | 0\n];\n\nvar W = new Array(80);\n\nfunction Sha1() {\n\tthis.init();\n\tthis._w = W;\n\n\tHash.call(this, 64, 56);\n}\n\ninherits(Sha1, Hash);\n\nSha1.prototype.init = function () {\n\tthis._a = 0x67452301;\n\tthis._b = 0xefcdab89;\n\tthis._c = 0x98badcfe;\n\tthis._d = 0x10325476;\n\tthis._e = 0xc3d2e1f0;\n\n\treturn this;\n};\n\nfunction rotl1(num) {\n\treturn (num << 1) | (num >>> 31);\n}\n\nfunction rotl5(num) {\n\treturn (num << 5) | (num >>> 27);\n}\n\nfunction rotl30(num) {\n\treturn (num << 30) | (num >>> 2);\n}\n\nfunction ft(s, b, c, d) {\n\tif (s === 0) {\n\t\treturn (b & c) | (~b & d);\n\t}\n\tif (s === 2) {\n\t\treturn (b & c) | (b & d) | (c & d);\n\t}\n\treturn b ^ c ^ d;\n}\n\nSha1.prototype._update = function (M) {\n\tvar w = this._w;\n\n\tvar a = this._a | 0;\n\tvar b = this._b | 0;\n\tvar c = this._c | 0;\n\tvar d = this._d | 0;\n\tvar e = this._e | 0;\n\n\tfor (var i = 0; i < 16; ++i) {\n\t\tw[i] = M.readInt32BE(i * 4);\n\t}\n\tfor (; i < 80; ++i) {\n\t\tw[i] = rotl1(w[i - 3] ^ w[i - 8] ^ w[i - 14] ^ w[i - 16]);\n\t}\n\n\tfor (var j = 0; j < 80; ++j) {\n\t\tvar s = ~~(j / 20);\n\t\tvar t = (rotl5(a) + ft(s, b, c, d) + e + w[j] + K[s]) | 0;\n\n\t\te = d;\n\t\td = c;\n\t\tc = rotl30(b);\n\t\tb = a;\n\t\ta = t;\n\t}\n\n\tthis._a = (a + this._a) | 0;\n\tthis._b = (b + this._b) | 0;\n\tthis._c = (c + this._c) | 0;\n\tthis._d = (d + this._d) | 0;\n\tthis._e = (e + this._e) | 0;\n};\n\nSha1.prototype._hash = function () {\n\tvar H = Buffer.allocUnsafe(20);\n\n\tH.writeInt32BE(this._a | 0, 0);\n\tH.writeInt32BE(this._b | 0, 4);\n\tH.writeInt32BE(this._c | 0, 8);\n\tH.writeInt32BE(this._d | 0, 12);\n\tH.writeInt32BE(this._e | 0, 16);\n\n\treturn H;\n};\n\nmodule.exports = Sha1;\n"
  },
  {
    "path": "sha224.js",
    "content": "'use strict';\n\n/**\n * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined\n * in FIPS 180-2\n * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009.\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n *\n */\n\nvar inherits = require('inherits');\nvar Sha256 = require('./sha256');\nvar Hash = require('./hash');\nvar Buffer = require('safe-buffer').Buffer;\n\nvar W = new Array(64);\n\nfunction Sha224() {\n\tthis.init();\n\n\tthis._w = W; // new Array(64)\n\n\tHash.call(this, 64, 56);\n}\n\ninherits(Sha224, Sha256);\n\nSha224.prototype.init = function () {\n\tthis._a = 0xc1059ed8;\n\tthis._b = 0x367cd507;\n\tthis._c = 0x3070dd17;\n\tthis._d = 0xf70e5939;\n\tthis._e = 0xffc00b31;\n\tthis._f = 0x68581511;\n\tthis._g = 0x64f98fa7;\n\tthis._h = 0xbefa4fa4;\n\n\treturn this;\n};\n\nSha224.prototype._hash = function () {\n\tvar H = Buffer.allocUnsafe(28);\n\n\tH.writeInt32BE(this._a, 0);\n\tH.writeInt32BE(this._b, 4);\n\tH.writeInt32BE(this._c, 8);\n\tH.writeInt32BE(this._d, 12);\n\tH.writeInt32BE(this._e, 16);\n\tH.writeInt32BE(this._f, 20);\n\tH.writeInt32BE(this._g, 24);\n\n\treturn H;\n};\n\nmodule.exports = Sha224;\n"
  },
  {
    "path": "sha256.js",
    "content": "'use strict';\n\n/**\n * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined\n * in FIPS 180-2\n * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009.\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n *\n */\n\nvar inherits = require('inherits');\nvar Hash = require('./hash');\nvar Buffer = require('safe-buffer').Buffer;\n\nvar K = [\n\t0x428A2F98,\n\t0x71374491,\n\t0xB5C0FBCF,\n\t0xE9B5DBA5,\n\t0x3956C25B,\n\t0x59F111F1,\n\t0x923F82A4,\n\t0xAB1C5ED5,\n\t0xD807AA98,\n\t0x12835B01,\n\t0x243185BE,\n\t0x550C7DC3,\n\t0x72BE5D74,\n\t0x80DEB1FE,\n\t0x9BDC06A7,\n\t0xC19BF174,\n\t0xE49B69C1,\n\t0xEFBE4786,\n\t0x0FC19DC6,\n\t0x240CA1CC,\n\t0x2DE92C6F,\n\t0x4A7484AA,\n\t0x5CB0A9DC,\n\t0x76F988DA,\n\t0x983E5152,\n\t0xA831C66D,\n\t0xB00327C8,\n\t0xBF597FC7,\n\t0xC6E00BF3,\n\t0xD5A79147,\n\t0x06CA6351,\n\t0x14292967,\n\t0x27B70A85,\n\t0x2E1B2138,\n\t0x4D2C6DFC,\n\t0x53380D13,\n\t0x650A7354,\n\t0x766A0ABB,\n\t0x81C2C92E,\n\t0x92722C85,\n\t0xA2BFE8A1,\n\t0xA81A664B,\n\t0xC24B8B70,\n\t0xC76C51A3,\n\t0xD192E819,\n\t0xD6990624,\n\t0xF40E3585,\n\t0x106AA070,\n\t0x19A4C116,\n\t0x1E376C08,\n\t0x2748774C,\n\t0x34B0BCB5,\n\t0x391C0CB3,\n\t0x4ED8AA4A,\n\t0x5B9CCA4F,\n\t0x682E6FF3,\n\t0x748F82EE,\n\t0x78A5636F,\n\t0x84C87814,\n\t0x8CC70208,\n\t0x90BEFFFA,\n\t0xA4506CEB,\n\t0xBEF9A3F7,\n\t0xC67178F2\n];\n\nvar W = new Array(64);\n\nfunction Sha256() {\n\tthis.init();\n\n\tthis._w = W; // new Array(64)\n\n\tHash.call(this, 64, 56);\n}\n\ninherits(Sha256, Hash);\n\nSha256.prototype.init = function () {\n\tthis._a = 0x6a09e667;\n\tthis._b = 0xbb67ae85;\n\tthis._c = 0x3c6ef372;\n\tthis._d = 0xa54ff53a;\n\tthis._e = 0x510e527f;\n\tthis._f = 0x9b05688c;\n\tthis._g = 0x1f83d9ab;\n\tthis._h = 0x5be0cd19;\n\n\treturn this;\n};\n\nfunction ch(x, y, z) {\n\treturn z ^ (x & (y ^ z));\n}\n\nfunction maj(x, y, z) {\n\treturn (x & y) | (z & (x | y));\n}\n\nfunction sigma0(x) {\n\treturn ((x >>> 2) | (x << 30)) ^ ((x >>> 13) | (x << 19)) ^ ((x >>> 22) | (x << 10));\n}\n\nfunction sigma1(x) {\n\treturn ((x >>> 6) | (x << 26)) ^ ((x >>> 11) | (x << 21)) ^ ((x >>> 25) | (x << 7));\n}\n\nfunction gamma0(x) {\n\treturn ((x >>> 7) | (x << 25)) ^ ((x >>> 18) | (x << 14)) ^ (x >>> 3);\n}\n\nfunction gamma1(x) {\n\treturn ((x >>> 17) | (x << 15)) ^ ((x >>> 19) | (x << 13)) ^ (x >>> 10);\n}\n\nSha256.prototype._update = function (M) {\n\tvar w = this._w;\n\n\tvar a = this._a | 0;\n\tvar b = this._b | 0;\n\tvar c = this._c | 0;\n\tvar d = this._d | 0;\n\tvar e = this._e | 0;\n\tvar f = this._f | 0;\n\tvar g = this._g | 0;\n\tvar h = this._h | 0;\n\n\tfor (var i = 0; i < 16; ++i) {\n\t\tw[i] = M.readInt32BE(i * 4);\n\t}\n\tfor (; i < 64; ++i) {\n\t\tw[i] = (gamma1(w[i - 2]) + w[i - 7] + gamma0(w[i - 15]) + w[i - 16]) | 0;\n\t}\n\n\tfor (var j = 0; j < 64; ++j) {\n\t\tvar T1 = (h + sigma1(e) + ch(e, f, g) + K[j] + w[j]) | 0;\n\t\tvar T2 = (sigma0(a) + maj(a, b, c)) | 0;\n\n\t\th = g;\n\t\tg = f;\n\t\tf = e;\n\t\te = (d + T1) | 0;\n\t\td = c;\n\t\tc = b;\n\t\tb = a;\n\t\ta = (T1 + T2) | 0;\n\t}\n\n\tthis._a = (a + this._a) | 0;\n\tthis._b = (b + this._b) | 0;\n\tthis._c = (c + this._c) | 0;\n\tthis._d = (d + this._d) | 0;\n\tthis._e = (e + this._e) | 0;\n\tthis._f = (f + this._f) | 0;\n\tthis._g = (g + this._g) | 0;\n\tthis._h = (h + this._h) | 0;\n};\n\nSha256.prototype._hash = function () {\n\tvar H = Buffer.allocUnsafe(32);\n\n\tH.writeInt32BE(this._a, 0);\n\tH.writeInt32BE(this._b, 4);\n\tH.writeInt32BE(this._c, 8);\n\tH.writeInt32BE(this._d, 12);\n\tH.writeInt32BE(this._e, 16);\n\tH.writeInt32BE(this._f, 20);\n\tH.writeInt32BE(this._g, 24);\n\tH.writeInt32BE(this._h, 28);\n\n\treturn H;\n};\n\nmodule.exports = Sha256;\n"
  },
  {
    "path": "sha384.js",
    "content": "'use strict';\n\nvar inherits = require('inherits');\nvar SHA512 = require('./sha512');\nvar Hash = require('./hash');\nvar Buffer = require('safe-buffer').Buffer;\n\nvar W = new Array(160);\n\nfunction Sha384() {\n\tthis.init();\n\tthis._w = W;\n\n\tHash.call(this, 128, 112);\n}\n\ninherits(Sha384, SHA512);\n\nSha384.prototype.init = function () {\n\tthis._ah = 0xcbbb9d5d;\n\tthis._bh = 0x629a292a;\n\tthis._ch = 0x9159015a;\n\tthis._dh = 0x152fecd8;\n\tthis._eh = 0x67332667;\n\tthis._fh = 0x8eb44a87;\n\tthis._gh = 0xdb0c2e0d;\n\tthis._hh = 0x47b5481d;\n\n\tthis._al = 0xc1059ed8;\n\tthis._bl = 0x367cd507;\n\tthis._cl = 0x3070dd17;\n\tthis._dl = 0xf70e5939;\n\tthis._el = 0xffc00b31;\n\tthis._fl = 0x68581511;\n\tthis._gl = 0x64f98fa7;\n\tthis._hl = 0xbefa4fa4;\n\n\treturn this;\n};\n\nSha384.prototype._hash = function () {\n\tvar H = Buffer.allocUnsafe(48);\n\n\tfunction writeInt64BE(h, l, offset) {\n\t\tH.writeInt32BE(h, offset);\n\t\tH.writeInt32BE(l, offset + 4);\n\t}\n\n\twriteInt64BE(this._ah, this._al, 0);\n\twriteInt64BE(this._bh, this._bl, 8);\n\twriteInt64BE(this._ch, this._cl, 16);\n\twriteInt64BE(this._dh, this._dl, 24);\n\twriteInt64BE(this._eh, this._el, 32);\n\twriteInt64BE(this._fh, this._fl, 40);\n\n\treturn H;\n};\n\nmodule.exports = Sha384;\n"
  },
  {
    "path": "sha512.js",
    "content": "'use strict';\n\nvar inherits = require('inherits');\nvar Hash = require('./hash');\nvar Buffer = require('safe-buffer').Buffer;\n\nvar K = [\n\t0x428a2f98,\n\t0xd728ae22,\n\t0x71374491,\n\t0x23ef65cd,\n\t0xb5c0fbcf,\n\t0xec4d3b2f,\n\t0xe9b5dba5,\n\t0x8189dbbc,\n\t0x3956c25b,\n\t0xf348b538,\n\t0x59f111f1,\n\t0xb605d019,\n\t0x923f82a4,\n\t0xaf194f9b,\n\t0xab1c5ed5,\n\t0xda6d8118,\n\t0xd807aa98,\n\t0xa3030242,\n\t0x12835b01,\n\t0x45706fbe,\n\t0x243185be,\n\t0x4ee4b28c,\n\t0x550c7dc3,\n\t0xd5ffb4e2,\n\t0x72be5d74,\n\t0xf27b896f,\n\t0x80deb1fe,\n\t0x3b1696b1,\n\t0x9bdc06a7,\n\t0x25c71235,\n\t0xc19bf174,\n\t0xcf692694,\n\t0xe49b69c1,\n\t0x9ef14ad2,\n\t0xefbe4786,\n\t0x384f25e3,\n\t0x0fc19dc6,\n\t0x8b8cd5b5,\n\t0x240ca1cc,\n\t0x77ac9c65,\n\t0x2de92c6f,\n\t0x592b0275,\n\t0x4a7484aa,\n\t0x6ea6e483,\n\t0x5cb0a9dc,\n\t0xbd41fbd4,\n\t0x76f988da,\n\t0x831153b5,\n\t0x983e5152,\n\t0xee66dfab,\n\t0xa831c66d,\n\t0x2db43210,\n\t0xb00327c8,\n\t0x98fb213f,\n\t0xbf597fc7,\n\t0xbeef0ee4,\n\t0xc6e00bf3,\n\t0x3da88fc2,\n\t0xd5a79147,\n\t0x930aa725,\n\t0x06ca6351,\n\t0xe003826f,\n\t0x14292967,\n\t0x0a0e6e70,\n\t0x27b70a85,\n\t0x46d22ffc,\n\t0x2e1b2138,\n\t0x5c26c926,\n\t0x4d2c6dfc,\n\t0x5ac42aed,\n\t0x53380d13,\n\t0x9d95b3df,\n\t0x650a7354,\n\t0x8baf63de,\n\t0x766a0abb,\n\t0x3c77b2a8,\n\t0x81c2c92e,\n\t0x47edaee6,\n\t0x92722c85,\n\t0x1482353b,\n\t0xa2bfe8a1,\n\t0x4cf10364,\n\t0xa81a664b,\n\t0xbc423001,\n\t0xc24b8b70,\n\t0xd0f89791,\n\t0xc76c51a3,\n\t0x0654be30,\n\t0xd192e819,\n\t0xd6ef5218,\n\t0xd6990624,\n\t0x5565a910,\n\t0xf40e3585,\n\t0x5771202a,\n\t0x106aa070,\n\t0x32bbd1b8,\n\t0x19a4c116,\n\t0xb8d2d0c8,\n\t0x1e376c08,\n\t0x5141ab53,\n\t0x2748774c,\n\t0xdf8eeb99,\n\t0x34b0bcb5,\n\t0xe19b48a8,\n\t0x391c0cb3,\n\t0xc5c95a63,\n\t0x4ed8aa4a,\n\t0xe3418acb,\n\t0x5b9cca4f,\n\t0x7763e373,\n\t0x682e6ff3,\n\t0xd6b2b8a3,\n\t0x748f82ee,\n\t0x5defb2fc,\n\t0x78a5636f,\n\t0x43172f60,\n\t0x84c87814,\n\t0xa1f0ab72,\n\t0x8cc70208,\n\t0x1a6439ec,\n\t0x90befffa,\n\t0x23631e28,\n\t0xa4506ceb,\n\t0xde82bde9,\n\t0xbef9a3f7,\n\t0xb2c67915,\n\t0xc67178f2,\n\t0xe372532b,\n\t0xca273ece,\n\t0xea26619c,\n\t0xd186b8c7,\n\t0x21c0c207,\n\t0xeada7dd6,\n\t0xcde0eb1e,\n\t0xf57d4f7f,\n\t0xee6ed178,\n\t0x06f067aa,\n\t0x72176fba,\n\t0x0a637dc5,\n\t0xa2c898a6,\n\t0x113f9804,\n\t0xbef90dae,\n\t0x1b710b35,\n\t0x131c471b,\n\t0x28db77f5,\n\t0x23047d84,\n\t0x32caab7b,\n\t0x40c72493,\n\t0x3c9ebe0a,\n\t0x15c9bebc,\n\t0x431d67c4,\n\t0x9c100d4c,\n\t0x4cc5d4be,\n\t0xcb3e42b6,\n\t0x597f299c,\n\t0xfc657e2a,\n\t0x5fcb6fab,\n\t0x3ad6faec,\n\t0x6c44198c,\n\t0x4a475817\n];\n\nvar W = new Array(160);\n\nfunction Sha512() {\n\tthis.init();\n\tthis._w = W;\n\n\tHash.call(this, 128, 112);\n}\n\ninherits(Sha512, Hash);\n\nSha512.prototype.init = function () {\n\tthis._ah = 0x6a09e667;\n\tthis._bh = 0xbb67ae85;\n\tthis._ch = 0x3c6ef372;\n\tthis._dh = 0xa54ff53a;\n\tthis._eh = 0x510e527f;\n\tthis._fh = 0x9b05688c;\n\tthis._gh = 0x1f83d9ab;\n\tthis._hh = 0x5be0cd19;\n\n\tthis._al = 0xf3bcc908;\n\tthis._bl = 0x84caa73b;\n\tthis._cl = 0xfe94f82b;\n\tthis._dl = 0x5f1d36f1;\n\tthis._el = 0xade682d1;\n\tthis._fl = 0x2b3e6c1f;\n\tthis._gl = 0xfb41bd6b;\n\tthis._hl = 0x137e2179;\n\n\treturn this;\n};\n\nfunction Ch(x, y, z) {\n\treturn z ^ (x & (y ^ z));\n}\n\nfunction maj(x, y, z) {\n\treturn (x & y) | (z & (x | y));\n}\n\nfunction sigma0(x, xl) {\n\treturn ((x >>> 28) | (xl << 4)) ^ ((xl >>> 2) | (x << 30)) ^ ((xl >>> 7) | (x << 25));\n}\n\nfunction sigma1(x, xl) {\n\treturn ((x >>> 14) | (xl << 18)) ^ ((x >>> 18) | (xl << 14)) ^ ((xl >>> 9) | (x << 23));\n}\n\nfunction Gamma0(x, xl) {\n\treturn ((x >>> 1) | (xl << 31)) ^ ((x >>> 8) | (xl << 24)) ^ (x >>> 7);\n}\n\nfunction Gamma0l(x, xl) {\n\treturn ((x >>> 1) | (xl << 31)) ^ ((x >>> 8) | (xl << 24)) ^ ((x >>> 7) | (xl << 25));\n}\n\nfunction Gamma1(x, xl) {\n\treturn ((x >>> 19) | (xl << 13)) ^ ((xl >>> 29) | (x << 3)) ^ (x >>> 6);\n}\n\nfunction Gamma1l(x, xl) {\n\treturn ((x >>> 19) | (xl << 13)) ^ ((xl >>> 29) | (x << 3)) ^ ((x >>> 6) | (xl << 26));\n}\n\nfunction getCarry(a, b) {\n\treturn (a >>> 0) < (b >>> 0) ? 1 : 0;\n}\n\nSha512.prototype._update = function (M) {\n\tvar w = this._w;\n\n\tvar ah = this._ah | 0;\n\tvar bh = this._bh | 0;\n\tvar ch = this._ch | 0;\n\tvar dh = this._dh | 0;\n\tvar eh = this._eh | 0;\n\tvar fh = this._fh | 0;\n\tvar gh = this._gh | 0;\n\tvar hh = this._hh | 0;\n\n\tvar al = this._al | 0;\n\tvar bl = this._bl | 0;\n\tvar cl = this._cl | 0;\n\tvar dl = this._dl | 0;\n\tvar el = this._el | 0;\n\tvar fl = this._fl | 0;\n\tvar gl = this._gl | 0;\n\tvar hl = this._hl | 0;\n\n\tfor (var i = 0; i < 32; i += 2) {\n\t\tw[i] = M.readInt32BE(i * 4);\n\t\tw[i + 1] = M.readInt32BE((i * 4) + 4);\n\t}\n\tfor (; i < 160; i += 2) {\n\t\tvar xh = w[i - (15 * 2)];\n\t\tvar xl = w[i - (15 * 2) + 1];\n\t\tvar gamma0 = Gamma0(xh, xl);\n\t\tvar gamma0l = Gamma0l(xl, xh);\n\n\t\txh = w[i - (2 * 2)];\n\t\txl = w[i - (2 * 2) + 1];\n\t\tvar gamma1 = Gamma1(xh, xl);\n\t\tvar gamma1l = Gamma1l(xl, xh);\n\n\t\t// w[i] = gamma0 + w[i - 7] + gamma1 + w[i - 16]\n\t\tvar Wi7h = w[i - (7 * 2)];\n\t\tvar Wi7l = w[i - (7 * 2) + 1];\n\n\t\tvar Wi16h = w[i - (16 * 2)];\n\t\tvar Wi16l = w[i - (16 * 2) + 1];\n\n\t\tvar Wil = (gamma0l + Wi7l) | 0;\n\t\tvar Wih = (gamma0 + Wi7h + getCarry(Wil, gamma0l)) | 0;\n\t\tWil = (Wil + gamma1l) | 0;\n\t\tWih = (Wih + gamma1 + getCarry(Wil, gamma1l)) | 0;\n\t\tWil = (Wil + Wi16l) | 0;\n\t\tWih = (Wih + Wi16h + getCarry(Wil, Wi16l)) | 0;\n\n\t\tw[i] = Wih;\n\t\tw[i + 1] = Wil;\n\t}\n\n\tfor (var j = 0; j < 160; j += 2) {\n\t\tWih = w[j];\n\t\tWil = w[j + 1];\n\n\t\tvar majh = maj(ah, bh, ch);\n\t\tvar majl = maj(al, bl, cl);\n\n\t\tvar sigma0h = sigma0(ah, al);\n\t\tvar sigma0l = sigma0(al, ah);\n\t\tvar sigma1h = sigma1(eh, el);\n\t\tvar sigma1l = sigma1(el, eh);\n\n\t\t// t1 = h + sigma1 + ch + K[j] + w[j]\n\t\tvar Kih = K[j];\n\t\tvar Kil = K[j + 1];\n\n\t\tvar chh = Ch(eh, fh, gh);\n\t\tvar chl = Ch(el, fl, gl);\n\n\t\tvar t1l = (hl + sigma1l) | 0;\n\t\tvar t1h = (hh + sigma1h + getCarry(t1l, hl)) | 0;\n\t\tt1l = (t1l + chl) | 0;\n\t\tt1h = (t1h + chh + getCarry(t1l, chl)) | 0;\n\t\tt1l = (t1l + Kil) | 0;\n\t\tt1h = (t1h + Kih + getCarry(t1l, Kil)) | 0;\n\t\tt1l = (t1l + Wil) | 0;\n\t\tt1h = (t1h + Wih + getCarry(t1l, Wil)) | 0;\n\n\t\t// t2 = sigma0 + maj\n\t\tvar t2l = (sigma0l + majl) | 0;\n\t\tvar t2h = (sigma0h + majh + getCarry(t2l, sigma0l)) | 0;\n\n\t\thh = gh;\n\t\thl = gl;\n\t\tgh = fh;\n\t\tgl = fl;\n\t\tfh = eh;\n\t\tfl = el;\n\t\tel = (dl + t1l) | 0;\n\t\teh = (dh + t1h + getCarry(el, dl)) | 0;\n\t\tdh = ch;\n\t\tdl = cl;\n\t\tch = bh;\n\t\tcl = bl;\n\t\tbh = ah;\n\t\tbl = al;\n\t\tal = (t1l + t2l) | 0;\n\t\tah = (t1h + t2h + getCarry(al, t1l)) | 0;\n\t}\n\n\tthis._al = (this._al + al) | 0;\n\tthis._bl = (this._bl + bl) | 0;\n\tthis._cl = (this._cl + cl) | 0;\n\tthis._dl = (this._dl + dl) | 0;\n\tthis._el = (this._el + el) | 0;\n\tthis._fl = (this._fl + fl) | 0;\n\tthis._gl = (this._gl + gl) | 0;\n\tthis._hl = (this._hl + hl) | 0;\n\n\tthis._ah = (this._ah + ah + getCarry(this._al, al)) | 0;\n\tthis._bh = (this._bh + bh + getCarry(this._bl, bl)) | 0;\n\tthis._ch = (this._ch + ch + getCarry(this._cl, cl)) | 0;\n\tthis._dh = (this._dh + dh + getCarry(this._dl, dl)) | 0;\n\tthis._eh = (this._eh + eh + getCarry(this._el, el)) | 0;\n\tthis._fh = (this._fh + fh + getCarry(this._fl, fl)) | 0;\n\tthis._gh = (this._gh + gh + getCarry(this._gl, gl)) | 0;\n\tthis._hh = (this._hh + hh + getCarry(this._hl, hl)) | 0;\n};\n\nSha512.prototype._hash = function () {\n\tvar H = Buffer.allocUnsafe(64);\n\n\tfunction writeInt64BE(h, l, offset) {\n\t\tH.writeInt32BE(h, offset);\n\t\tH.writeInt32BE(l, offset + 4);\n\t}\n\n\twriteInt64BE(this._ah, this._al, 0);\n\twriteInt64BE(this._bh, this._bl, 8);\n\twriteInt64BE(this._ch, this._cl, 16);\n\twriteInt64BE(this._dh, this._dl, 24);\n\twriteInt64BE(this._eh, this._el, 32);\n\twriteInt64BE(this._fh, this._fl, 40);\n\twriteInt64BE(this._gh, this._gl, 48);\n\twriteInt64BE(this._hh, this._hl, 56);\n\n\treturn H;\n};\n\nmodule.exports = Sha512;\n"
  },
  {
    "path": "test/hash.js",
    "content": "'use strict';\n\nvar tape = require('tape');\nvar Buffer = require('safe-buffer').Buffer;\n\nvar Hash = require('../hash');\n\nvar hex = '0A1B2C3D4E5F6G7H';\n\nfunction equal(t, a, b) {\n\tt.equal(a.length, b.length);\n\tt.equal(a.toString('hex'), b.toString('hex'));\n}\n\nvar hexBuf = Buffer.from('0A1B2C3D4E5F6G7H', 'utf8');\nvar count16 = {\n\tstrings: ['0A1B2C3D4E5F6G7H'],\n\tbuffers: [\n\t\thexBuf,\n\t\tBuffer.from('80000000000000000000000000000080', 'hex')\n\t]\n};\n\nvar empty = {\n\tstrings: [''],\n\tbuffers: [\n\t\tBuffer.from('80000000000000000000000000000000', 'hex')\n\t]\n};\n\nvar multi = {\n\tstrings: ['abcd', 'efhijk', 'lmnopq'],\n\tbuffers: [\n\t\tBuffer.from('abcdefhijklmnopq', 'ascii'),\n\t\tBuffer.from('80000000000000000000000000000080', 'hex')\n\t]\n};\n\nvar long = {\n\tstrings: [hex + hex],\n\tbuffers: [\n\t\thexBuf,\n\t\thexBuf,\n\t\tBuffer.from('80000000000000000000000000000100', 'hex')\n\t]\n};\n\nfunction makeTest(name, data) {\n\ttape(name, function (t) {\n\t\tvar h = new Hash(16, 8);\n\t\tvar hash = Buffer.alloc(20);\n\t\tvar n = 2;\n\t\tvar expected = data.buffers.slice();\n\t\t// t.plan(expected.length + 1)\n\n\t\th._update = function (block) {\n\t\t\tvar e = expected.shift();\n\t\t\tequal(t, block, e);\n\n\t\t\tif (n < 0) {\n\t\t\t\tthrow new Error('expecting only 2 calls to _update');\n\t\t\t}\n\t\t};\n\t\th._hash = function () {\n\t\t\treturn hash;\n\t\t};\n\n\t\tdata.strings.forEach(function (string) {\n\t\t\th.update(string, 'ascii');\n\t\t});\n\n\t\tequal(t, h.digest(), hash);\n\t\tt.end();\n\t});\n}\n\nmakeTest('Hash#update 1 in 1', count16);\nmakeTest('empty Hash#update', empty);\nmakeTest('Hash#update 1 in 3', multi);\nmakeTest('Hash#update 2 in 1', long);\n"
  },
  {
    "path": "test/test.js",
    "content": "'use strict';\n\nvar crypto = require('crypto');\nvar tape = require('tape');\nvar Buffer = require('safe-buffer').Buffer;\n\nvar Sha1 = require('../').sha1;\n\nvar nodeSupportsUint16 = false;\ntry {\n\tcrypto.createHash('sha1').update(new Uint16Array());\n\tnodeSupportsUint16 = true;\n} catch (err) {}\n\nvar inputs = [\n\t['', 'ascii'],\n\t['abc', 'ascii'],\n\t['123', 'ascii'],\n\t['123456789abcdef123456789abcdef123456789abcdef123456789abcdef', 'ascii'],\n\t['123456789abcdef123456789abcdef123456789abcdef123456789abc', 'ascii'],\n\t['123456789abcdef123456789abcdef123456789abcdef123456789ab', 'ascii'],\n\t['0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcde', 'ascii'],\n\t['0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef', 'ascii'],\n\t['foobarbaz', 'ascii'],\n\t[Buffer.from('buffer')],\n\tnodeSupportsUint16 ? [new Uint16Array([1, 2, 3])] : null\n].filter(Boolean);\n\ntape(\"hash is the same as node's crypto\", function (t) {\n\tinputs.forEach(function (v) {\n\t\tvar a = new Sha1().update(v[0], v[1]).digest('hex');\n\t\tvar e = crypto.createHash('sha1').update(v[0], v[1]).digest('hex');\n\t\tt.equal(a, e, a + ' == ' + e);\n\t});\n\n\tt.end();\n});\n\ntape('call update multiple times', function (t) {\n\tinputs.forEach(function (v) {\n\t\tvar hash = new Sha1();\n\t\tvar sha1hash = crypto.createHash('sha1');\n\n\t\tfor (var i = 0; i < v[0].length; i = (i + 1) * 2) {\n\t\t\tvar s = v[0].slice(i, (i + 1) * 2);\n\t\t\thash.update(s, v[1]);\n\t\t\tsha1hash.update(s, v[1]);\n\t\t}\n\n\t\tvar a = hash.digest('hex');\n\t\tvar e = sha1hash.digest('hex');\n\t\tt.equal(a, e, a + ' == ' + e);\n\t});\n\tt.end();\n});\n\ntape('call update twice', function (t) {\n\tvar sha1hash = crypto.createHash('sha1');\n\tvar hash = new Sha1();\n\n\tsha1hash.update('foo', 'ascii');\n\thash.update('foo', 'ascii');\n\n\tsha1hash.update('bar', 'ascii');\n\thash.update('bar', 'ascii');\n\n\tsha1hash.update('baz', 'ascii');\n\thash.update('baz', 'ascii');\n\n\tvar a = hash.digest('hex');\n\tvar e = sha1hash.digest('hex');\n\n\tt.equal(a, e);\n\tt.end();\n});\n\ntape('hex encoding', function (t) {\n\tinputs.forEach(function (v) {\n\t\tvar hash = new Sha1();\n\t\tvar sha1hash = crypto.createHash('sha1');\n\n\t\tfor (var i = 0; i < v[0].length; i = (i + 1) * 2) {\n\t\t\tvar s = v[0].slice(i, (i + 1) * 2);\n\t\t\thash.update(Buffer.from(s, 'ascii').toString('hex'), 'hex');\n\t\t\tsha1hash.update(Buffer.from(s, 'ascii').toString('hex'), 'hex');\n\t\t}\n\t\tvar a = hash.digest('hex');\n\t\tvar e = sha1hash.digest('hex');\n\n\t\tt.equal(a, e, a + ' == ' + e);\n\t});\n\n\tt.end();\n});\n\ntape('throws on invalid input', function (t) {\n\tvar invalid = [\n\t\t{}, // non-arrayish\n\t\t{ length: 20 }, // undefined values\n\t\t[NaN], // non-numbers\n\t\t[[]], // non-numbers\n\t\t[1, 1.5], // non-integers\n\t\t[1, 256], // out of bounds\n\t\t[-1, 0] // out of bounds\n\t];\n\n\tinvalid.forEach(function (input) {\n\t\tvar hash = new Sha1();\n\n\t\tt['throws'](function () {\n\t\t\thash.update(input);\n\t\t\thash.digest('hex');\n\t\t});\n\t});\n\n\tt.end();\n});\n\ntape('call digest for more than MAX_UINT32 bits of data', function (t) {\n\tvar sha1hash = crypto.createHash('sha1');\n\tvar hash = new Sha1();\n\tvar bigData;\n\ttry {\n\t\tbigData = Buffer.alloc(0x1ffffffff / 8);\n\t} catch (err) {\n\t\t// node < 3 has a lower buffer size limit than node 3+. node 0.10 requires the `/8`, 0.12 - 2 are fine with `-8`\n\t\tbigData = Buffer.alloc(0x3fffffff / 8);\n\t}\n\n\thash.update(bigData);\n\tsha1hash.update(bigData);\n\n\tvar a = hash.digest('hex');\n\tvar e = sha1hash.digest('hex');\n\n\tt.equal(a, e, a + ' == ' + e);\n\tt.end();\n});\n"
  },
  {
    "path": "test/vectors.js",
    "content": "'use strict';\n\nvar tape = require('tape');\nvar vectors = require('hash-test-vectors');\n// var from = require('bops/typedarray/from')\nvar Buffer = require('safe-buffer').Buffer;\n\nvar createHash = require('../');\n\nfunction makeTest(alg, i, verbose) {\n\tvar v = vectors[i];\n\n\ttape(alg + ': NIST vector ' + i, function (t) {\n\t\tif (verbose) {\n\t\t\tt.comment(v);\n\t\t\tt.comment('VECTOR', i);\n\t\t\tt.comment('INPUT', v.input);\n\t\t\tt.comment(Buffer.from(v.input, 'base64').toString('hex'));\n\t\t}\n\n\t\tvar buf = Buffer.from(v.input, 'base64');\n\t\tt.equal(createHash(alg).update(buf).digest('hex'), v[alg]);\n\n\t\t// eslint-disable-next-line no-param-reassign\n\t\ti = ~~(buf.length / 2);\n\t\tvar buf1 = buf.slice(0, i);\n\t\tvar buf2 = buf.slice(i, buf.length);\n\n\t\tt.comment(buf1.length + ', ' + buf2.length + ', ' + buf.length);\n\t\tt.comment(createHash(alg)._block.length);\n\n\t\tt.equal(\n\t\t\tcreateHash(alg)\n\t\t\t\t.update(buf1)\n\t\t\t\t.update(buf2)\n\t\t\t\t.digest('hex'),\n\t\t\tv[alg]\n\t\t);\n\n\t\tvar j, buf3;\n\n\t\t// eslint-disable-next-line no-param-reassign\n\t\ti = ~~(buf.length / 3);\n\t\tj = ~~(buf.length * 2 / 3);\n\t\tbuf1 = buf.slice(0, i);\n\t\tbuf2 = buf.slice(i, j);\n\t\tbuf3 = buf.slice(j, buf.length);\n\n\t\tt.equal(\n\t\t\tcreateHash(alg)\n\t\t\t\t.update(buf1)\n\t\t\t\t.update(buf2)\n\t\t\t\t.update(buf3)\n\t\t\t\t.digest('hex'),\n\t\t\tv[alg]\n\t\t);\n\n\t\tsetTimeout(function () {\n\t\t\t// avoid \"too much recursion\" errors in tape in firefox\n\t\t\tt.end();\n\t\t});\n\t});\n}\n\nvectors.forEach(function (v, i) {\n\tmakeTest('sha', i);\n\tmakeTest('sha1', i);\n\tmakeTest('sha224', i);\n\tmakeTest('sha256', i);\n\tmakeTest('sha384', i);\n\tmakeTest('sha512', i);\n});\n"
  }
]