{"id":17497574,"url":"https://github.com/simonepri/phc-bcrypt","last_synced_at":"2025-04-28T16:09:59.611Z","repository":{"id":49985074,"uuid":"99381738","full_name":"simonepri/phc-bcrypt","owner":"simonepri","description":"🔒 Easy to use Unified API for bcrypt password hashing algorithm","archived":false,"fork":false,"pushed_at":"2021-06-07T04:16:32.000Z","size":40,"stargazers_count":6,"open_issues_count":10,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T11:19:26.884Z","etag":null,"topics":["api","bcrypt","hashing","nodejs","password","secure","unified","upash"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonepri.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-04T21:45:08.000Z","updated_at":"2022-06-10T18:56:41.000Z","dependencies_parsed_at":"2022-08-03T15:45:11.010Z","dependency_job_id":null,"html_url":"https://github.com/simonepri/phc-bcrypt","commit_stats":null,"previous_names":["simonepri/credential-plus-bcrypt"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonepri%2Fphc-bcrypt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonepri%2Fphc-bcrypt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonepri%2Fphc-bcrypt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonepri%2Fphc-bcrypt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonepri","download_url":"https://codeload.github.com/simonepri/phc-bcrypt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250972548,"owners_count":21516380,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","bcrypt","hashing","nodejs","password","secure","unified","upash"],"created_at":"2024-10-19T15:59:50.074Z","updated_at":"2025-04-28T16:09:59.592Z","avatar_url":"https://github.com/simonepri.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003cb\u003ephc-bcrypt\u003c/b\u003e\n\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n  \u003c!-- CI - TravisCI --\u003e\n  \u003ca href=\"https://travis-ci.com/simonepri/phc-bcrypt\"\u003e\n    \u003cimg src=\"https://img.shields.io/travis/com/simonepri/phc-bcrypt/master.svg?label=MacOS%20%26%20Linux\" alt=\"Mac/Linux Build Status\" /\u003e\n  \u003c/a\u003e\n  \u003c!-- CI - AppVeyor --\u003e\n  \u003ca href=\"https://ci.appveyor.com/project/simonepri/phc-bcrypt\"\u003e\n    \u003cimg src=\"https://img.shields.io/appveyor/ci/simonepri/phc-bcrypt/master.svg?label=Windows\" alt=\"Windows Build status\" /\u003e\n  \u003c/a\u003e\n  \u003c!-- Coverage - Codecov --\u003e\n  \u003ca href=\"https://codecov.io/gh/simonepri/phc-bcrypt\"\u003e\n    \u003cimg src=\"https://img.shields.io/codecov/c/github/simonepri/phc-bcrypt/master.svg\" alt=\"Codecov Coverage report\" /\u003e\n  \u003c/a\u003e\n  \u003c!-- DM - Snyk --\u003e\n  \u003ca href=\"https://snyk.io/test/github/simonepri/phc-bcrypt?targetFile=package.json\"\u003e\n    \u003cimg src=\"https://snyk.io/test/github/simonepri/phc-bcrypt/badge.svg?targetFile=package.json\" alt=\"Known Vulnerabilities\" /\u003e\n  \u003c/a\u003e\n  \u003c!-- DM - David --\u003e\n  \u003ca href=\"https://david-dm.org/simonepri/phc-bcrypt\"\u003e\n    \u003cimg src=\"https://david-dm.org/simonepri/phc-bcrypt/status.svg\" alt=\"Dependency Status\" /\u003e\n  \u003c/a\u003e\n\n  \u003cbr/\u003e\n\n  \u003c!-- Code Style - XO-Prettier --\u003e\n  \u003ca href=\"https://github.com/xojs/xo\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/code_style-XO+Prettier-5ed9c7.svg\" alt=\"XO Code Style used\" /\u003e\n  \u003c/a\u003e\n  \u003c!-- Test Runner - AVA --\u003e\n  \u003ca href=\"https://github.com/avajs/ava\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/test_runner-AVA-fb3170.svg\" alt=\"AVA Test Runner used\" /\u003e\n  \u003c/a\u003e\n  \u003c!-- Test Coverage - Istanbul --\u003e\n  \u003ca href=\"https://github.com/istanbuljs/nyc\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/test_coverage-NYC-fec606.svg\" alt=\"Istanbul Test Coverage used\" /\u003e\n  \u003c/a\u003e\n  \u003c!-- Init - ni --\u003e\n  \u003ca href=\"https://github.com/simonepri/ni\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/initialized_with-ni-e74c3c.svg\" alt=\"NI Scaffolding System used\" /\u003e\n  \u003c/a\u003e\n  \u003c!-- Release - np --\u003e\n  \u003ca href=\"https://github.com/sindresorhus/np\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/released_with-np-6c8784.svg\" alt=\"NP Release System used\" /\u003e\n  \u003c/a\u003e\n\n  \u003cbr/\u003e\n\n  \u003c!-- Version - npm --\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@phc/bcrypt\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/@phc/bcrypt.svg\" alt=\"Latest version on npm\" /\u003e\n  \u003c/a\u003e\n  \u003c!-- License - MIT --\u003e\n  \u003ca href=\"https://github.com/simonepri/phc-bcrypt/tree/master/license\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/simonepri/phc-bcrypt.svg\" alt=\"Project license\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  🔒 Node.JS bcrypt password hashing algorithm following the PHC string format.\n  \u003cbr/\u003e\n\n  \u003csub\u003e\n    Coded with ❤️ by \u003ca href=\"#authors\"\u003eSimone Primarosa\u003c/a\u003e.\n  \u003c/sub\u003e\n\u003c/p\u003e\n\n## PHC String Format\n\nThe [PHC String Format][specs:phc] is an attempt to specify a common hash string format that’s a restricted \u0026 well defined subset of the Modular Crypt Format. New hashes are strongly encouraged to adhere to the PHC specification, rather than the much looser [Modular Crypt Format][specs:mcf].\n\nThe hash strings generated by this package are in the following format:\n\n```c\n$bcrypt$v=\u003cversion\u003er=\u003crounds\u003e$\u003csalt\u003e$\u003chash\u003e\n```\n\nWhere:\n\n| Field | Type | Description\n| --- | --- | --- |\n| `\u003cversion\u003e` | \u003ccode\u003enumber\u003c/code\u003e | The version of the bcrypt algorithm used. |\n| `\u003crounds\u003e` | \u003ccode\u003enumber\u003c/code\u003e | The cost of processing data encoded as log2(iterations). |\n| `\u003csalt\u003e` | \u003ccode\u003estring\u003c/code\u003e | A sequence of bits, known as a [cryptographic salt][specs:salt] encoded in [B64][specs:B64]. |\n| `\u003chash\u003e` | \u003ccode\u003estring\u003c/code\u003e | The computed derived key by the [bcrypt][specs:bcrypt] algorithm encoded in [B64][specs:B64]. |\n\nFor more details consult the bcrypt paper [here][paper].\n\n## Install\n\n```bash\nnpm install --save @phc/bcrypt\n```\n\n## Usage\n\n```js\nconst bcrypt = require('@phc/bcrypt');\n\n// Hash and verify with bcrypt and default configs\nconst hash = await bcrypt.hash('password');\n// =\u003e $bcrypt$v=98$r=10$Fu+++1sHIGTodjyG4pF4Sw$QlOihTVOARhpV0EiWv4k10i5Pw5Hm0E\n\nconst match = await bcrypt.verify(hash, 'password');\n// =\u003e true\n\nconst match = await bcrypt.verify(hash, 'wrong');\n// =\u003e false\n\nconst ids = bcrypt.identifiers();\n// =\u003e ['bcrypt']\n```\n\n## Benchmarks\n\nBelow you can find usage statistics of this hashing algorithm with different\noptions.  \nThis should help you understand how the different options affects the running\ntime and memory usage of the algorithm.\n\nUsage reports are generated thanks to [sympact][gh:sympact].\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eSystem Report\u003c/strong\u003e ↴\u003c/summary\u003e\n\n```\nDistro    Release  Platform  Arch\n--------  -------  --------  ----\nMac OS X  10.12.6  darwin    x64\n\nCPU     Brand           Clock     Cores\n------  --------------  --------  -----\nIntel®  Core™ i5-6360U  2.00 GHz  4    \n\nMemory                  Type    Size         Clock   \n----------------------  ------  -----------  --------\nMicron Technology Inc.  LPDDR3  4294.967 MB  1867 MHz\nMicron Technology Inc.  LPDDR3  4294.967 MB  1867 MHz\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eDefault options\u003c/strong\u003e - \u003ci\u003e{rounds:10}\u003c/i\u003e ↴\u003c/summary\u003e\n\n```\nCPU Usage (avarage ± σ)  CPU Usage Range (min … max)\n-----------------------  ---------------------------\n205.71 % ± 149.94 %      0.00 % … 480.00 %          \n\nRAM Usage (avarage ± σ)  RAM Usage Range (min … max)\n-----------------------  ---------------------------\n26.638 MB ± 2.191 MB     21.438 MB … 27.787 MB      \n\nExecution time  Sampling time  Samples  \n--------------  -------------  ---------\n0.161 s         0.233 s        7 samples\n\nInstant  CPU Usage  RAM Usage  PIDS\n-------  ---------  ---------  -----\n0.040 s  480.00 %   21.438 MB  31313\n0.102 s  360.00 %   26.190 MB  31313\n0.134 s  180.00 %   27.754 MB  31313\n0.162 s  180.00 %   27.754 MB  31313\n0.189 s  120.00 %   27.754 MB  31313\n0.215 s  120.00 %   27.787 MB  31313\n0.233 s  0.00 %     27.787 MB  31313\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eCost of 4\u003c/strong\u003e - \u003ci\u003e{rounds:4}\u003c/i\u003e ↴\u003c/summary\u003e\n\n```\nCPU Usage (avarage ± σ)  CPU Usage Range (min … max)\n-----------------------  ---------------------------\n190.00 % ± 181.38 %      0.00 % … 480.00 %          \n\nRAM Usage (avarage ± σ)  RAM Usage Range (min … max)\n-----------------------  ---------------------------\n26.470 MB ± 2.443 MB     21.635 MB … 28.176 MB      \n\nExecution time  Sampling time  Samples  \n--------------  -------------  ---------\n0.158 s         0.323 s        6 samples\n\nInstant  CPU Usage  RAM Usage  PIDS\n-------  ---------  ---------  -----\n0.109 s  480.00 %   21.635 MB  31491\n0.211 s  300.00 %   24.973 MB  31491\n0.262 s  300.00 %   27.681 MB  31491\n0.289 s  60.00 %    28.176 MB  31491\n0.308 s  0.00 %     28.176 MB  31491\n0.323 s  0.00 %     28.176 MB  31491\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eCost of 8\u003c/strong\u003e - \u003ci\u003e{rounds:8}\u003c/i\u003e ↴\u003c/summary\u003e\n\n```\nCPU Usage (avarage ± σ)  CPU Usage Range (min … max)\n-----------------------  ---------------------------\n93.75 % ± 114.67 %       0.00 % … 300.00 %          \n\nRAM Usage (avarage ± σ)  RAM Usage Range (min … max)\n-----------------------  ---------------------------\n26.556 MB ± 2.101 MB     21.651 MB … 27.976 MB      \n\nExecution time  Sampling time  Samples  \n--------------  -------------  ---------\n0.293 s         0.494 s        8 samples\n\nInstant  CPU Usage  RAM Usage  PIDS\n-------  ---------  ---------  -----\n0.079 s  270.00 %   21.651 MB  31602\n0.226 s  300.00 %   25.137 MB  31602\n0.311 s  0.00 %     26.173 MB  31602\n0.342 s  90.00 %    27.619 MB  31602\n0.364 s  60.00 %    27.939 MB  31602\n0.445 s  30.00 %    27.976 MB  31602\n0.492 s  0.00 %     27.976 MB  31602\n0.494 s  0.00 %     27.976 MB  31602\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eCost of 12\u003c/strong\u003e - \u003ci\u003e{rounds:12}\u003c/i\u003e ↴\u003c/summary\u003e\n\n```\nCPU Usage (avarage ± σ)  CPU Usage Range (min … max)\n-----------------------  ---------------------------\n155.00 % ± 101.61 %      0.00 % … 480.00 %          \n\nRAM Usage (avarage ± σ)  RAM Usage Range (min … max)\n-----------------------  ---------------------------\n27.131 MB ± 1.720 MB     21.631 MB … 27.988 MB      \n\nExecution time  Sampling time  Samples   \n--------------  -------------  ----------\n0.486 s         0.575 s        18 samples\n\nInstant  CPU Usage  RAM Usage  PIDS\n-------  ---------  ---------  -----\n0.057 s  480.00 %   21.631 MB  32051\n0.127 s  300.00 %   24.285 MB  32051\n0.157 s  120.00 %   25.219 MB  32051\n0.185 s  120.00 %   25.833 MB  32051\n0.214 s  180.00 %   27.951 MB  32051\n0.235 s  120.00 %   27.951 MB  32051\n0.264 s  120.00 %   27.951 MB  32051\n0.295 s  180.00 %   27.951 MB  32051\n0.324 s  180.00 %   27.951 MB  32051\n0.354 s  180.00 %   27.951 MB  32051\n0.383 s  180.00 %   27.951 MB  32051\n0.411 s  180.00 %   27.951 MB  32051\n0.439 s  120.00 %   27.951 MB  32051\n0.469 s  90.00 %    27.951 MB  32051\n0.497 s  90.00 %    27.951 MB  32051\n0.532 s  120.00 %   27.951 MB  32051\n0.556 s  30.00 %    27.988 MB  32051\n0.575 s  0.00 %     27.988 MB  32051\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eCost of 14\u003c/strong\u003e - \u003ci\u003e{rounds:14}\u003c/i\u003e ↴\u003c/summary\u003e\n\n```\nCPU Usage (avarage ± σ)  CPU Usage Range (min … max)\n-----------------------  ---------------------------\n112.91 % ± 75.45 %       0.00 % … 420.00 %          \n\nRAM Usage (avarage ± σ)  RAM Usage Range (min … max)\n-----------------------  ---------------------------\n27.983 MB ± 0.905 MB     21.705 MB … 28.176 MB      \n\nExecution time  Sampling time  Samples   \n--------------  -------------  ----------\n1.608 s         1.68 s         55 samples\n\nInstant  CPU Usage  RAM Usage  PIDS\n-------  ---------  ---------  -----\n0.039 s  420.00 %   21.705 MB  32176\n0.104 s  420.00 %   25.899 MB  32176\n0.145 s  180.00 %   28.140 MB  32176\n0.180 s  180.00 %   28.140 MB  32176\n0.211 s  180.00 %   28.140 MB  32176\n0.234 s  120.00 %   28.140 MB  32176\n0.258 s  120.00 %   28.140 MB  32176\n0.291 s  180.00 %   28.140 MB  32176\n0.334 s  180.00 %   28.140 MB  32176\n0.361 s  60.00 %    28.140 MB  32176\n0.383 s  180.00 %   28.140 MB  32176\n0.416 s  120.00 %   28.140 MB  32176\n0.445 s  180.00 %   28.140 MB  32176\n0.473 s  180.00 %   28.140 MB  32176\n0.501 s  120.00 %   28.140 MB  32176\n0.531 s  180.00 %   28.140 MB  32176\n0.561 s  120.00 %   28.140 MB  32176\n0.589 s  180.00 %   28.140 MB  32176\n0.616 s  120.00 %   28.140 MB  32176\n0.646 s  180.00 %   28.140 MB  32176\n0.677 s  90.00 %    28.140 MB  32176\n0.706 s  60.00 %    28.140 MB  32176\n0.743 s  90.00 %    28.140 MB  32176\n0.777 s  90.00 %    28.140 MB  32176\n0.804 s  60.00 %    28.140 MB  32176\n0.828 s  90.00 %    28.140 MB  32176\n0.859 s  60.00 %    28.140 MB  32176\n0.887 s  90.00 %    28.140 MB  32176\n0.916 s  90.00 %    28.140 MB  32176\n0.952 s  90.00 %    28.140 MB  32176\n0.981 s  60.00 %    28.140 MB  32176\n1.024 s  60.00 %    28.140 MB  32176\n1.058 s  90.00 %    28.140 MB  32176\n1.083 s  60.00 %    28.140 MB  32176\n1.113 s  90.00 %    28.140 MB  32176\n1.140 s  0.00 %     28.140 MB  32176\n1.170 s  60.00 %    28.140 MB  32176\n1.199 s  90.00 %    28.140 MB  32176\n1.227 s  90.00 %    28.140 MB  32176\n1.255 s  90.00 %    28.140 MB  32176\n1.284 s  60.00 %    28.140 MB  32176\n1.313 s  90.00 %    28.140 MB  32176\n1.342 s  60.00 %    28.140 MB  32176\n1.370 s  90.00 %    28.140 MB  32176\n1.397 s  90.00 %    28.140 MB  32176\n1.428 s  90.00 %    28.140 MB  32176\n1.456 s  60.00 %    28.140 MB  32176\n1.484 s  90.00 %    28.140 MB  32176\n1.511 s  90.00 %    28.140 MB  32176\n1.541 s  60.00 %    28.140 MB  32176\n1.578 s  120.00 %   28.140 MB  32176\n1.601 s  60.00 %    28.140 MB  32176\n1.629 s  60.00 %    28.140 MB  32176\n1.655 s  90.00 %    28.176 MB  32176\n1.680 s  0.00 %     28.176 MB  32176\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eCost of 16\u003c/strong\u003e - \u003ci\u003e{rounds:16}\u003c/i\u003e ↴\u003c/summary\u003e\n\n```\nCPU Usage (avarage ± σ)  CPU Usage Range (min … max)\n-----------------------  ---------------------------\n40.42 % ± 47.22 %        0.00 % … 540.00 %          \n\nRAM Usage (avarage ± σ)  RAM Usage Range (min … max)\n-----------------------  ---------------------------\n27.793 MB ± 0.487 MB     21.656 MB … 27.881 MB      \n\nExecution time  Sampling time  Samples    \n--------------  -------------  -----------\n7.237 s         7.322 s        236 samples\n\nInstant  CPU Usage  RAM Usage  PIDS\n-------  ---------  ---------  -----\n0.046 s  540.00 %   21.656 MB  32810\n0.219 s  300.00 %   24.527 MB  32810\n0.261 s  180.00 %   25.407 MB  32810\n0.292 s  180.00 %   26.694 MB  32810\n0.300 s  60.00 %    27.673 MB  32810\n0.326 s  120.00 %   27.849 MB  32810\n0.353 s  120.00 %   27.849 MB  32810\n0.383 s  180.00 %   27.849 MB  32810\n0.409 s  120.00 %   27.849 MB  32810\n0.440 s  180.00 %   27.849 MB  32810\n0.472 s  120.00 %   27.849 MB  32810\n0.511 s  90.00 %    27.849 MB  32810\n0.554 s  90.00 %    27.849 MB  32810\n0.577 s  60.00 %    27.849 MB  32810\n0.605 s  60.00 %    27.849 MB  32810\n0.627 s  60.00 %    27.849 MB  32810\n0.657 s  90.00 %    27.849 MB  32810\n0.688 s  90.00 %    27.849 MB  32810\n0.721 s  90.00 %    27.849 MB  32810\n0.743 s  60.00 %    27.849 MB  32810\n0.770 s  90.00 %    27.849 MB  32810\n0.799 s  90.00 %    27.849 MB  32810\n0.827 s  60.00 %    27.849 MB  32810\n0.854 s  90.00 %    27.849 MB  32810\n0.883 s  90.00 %    27.849 MB  32810\n0.928 s  90.00 %    27.849 MB  32810\n0.952 s  30.00 %    27.849 MB  32810\n0.993 s  60.00 %    27.849 MB  32810\n1.025 s  30.00 %    27.849 MB  32810\n1.051 s  60.00 %    27.849 MB  32810\n1.084 s  60.00 %    27.849 MB  32810\n1.108 s  60.00 %    27.849 MB  32810\n1.134 s  60.00 %    27.849 MB  32810\n1.159 s  60.00 %    27.849 MB  32810\n1.187 s  90.00 %    27.849 MB  32810\n1.216 s  90.00 %    27.849 MB  32810\n1.244 s  60.00 %    27.849 MB  32810\n1.274 s  0.00 %     27.849 MB  32810\n1.312 s  90.00 %    27.849 MB  32810\n1.348 s  60.00 %    27.849 MB  32810\n1.379 s  30.00 %    27.849 MB  32810\n1.405 s  30.00 %    27.849 MB  32810\n1.440 s  90.00 %    27.849 MB  32810\n1.467 s  60.00 %    27.849 MB  32810\n1.496 s  60.00 %    27.849 MB  32810\n1.519 s  60.00 %    27.849 MB  32810\n1.548 s  40.00 %    27.849 MB  32810\n1.576 s  60.00 %    27.849 MB  32810\n1.604 s  60.00 %    27.849 MB  32810\n1.645 s  60.00 %    27.849 MB  32810\n1.679 s  20.00 %    27.849 MB  32810\n1.709 s  40.00 %    27.849 MB  32810\n1.738 s  20.00 %    27.849 MB  32810\n1.771 s  40.00 %    27.849 MB  32810\n1.816 s  60.00 %    27.849 MB  32810\n1.877 s  20.00 %    27.849 MB  32810\n1.881 s  20.00 %    27.849 MB  32810\n1.916 s  40.00 %    27.849 MB  32810\n1.944 s  20.00 %    27.849 MB  32810\n1.980 s  40.00 %    27.849 MB  32810\n2.007 s  20.00 %    27.849 MB  32810\n2.035 s  40.00 %    27.849 MB  32810\n2.069 s  60.00 %    27.849 MB  32810\n2.138 s  40.00 %    27.849 MB  32810\n2.147 s  20.00 %    27.849 MB  32810\n2.210 s  60.00 %    27.849 MB  32810\n2.223 s  40.00 %    27.849 MB  32810\n2.262 s  40.00 %    27.849 MB  32810\n2.282 s  20.00 %    27.849 MB  32810\n2.310 s  40.00 %    27.849 MB  32810\n2.330 s  40.00 %    27.849 MB  32810\n2.358 s  60.00 %    27.849 MB  32810\n2.387 s  40.00 %    27.849 MB  32810\n2.458 s  60.00 %    27.849 MB  32810\n2.475 s  40.00 %    27.849 MB  32810\n2.499 s  20.00 %    27.849 MB  32810\n2.535 s  30.00 %    27.849 MB  32810\n2.565 s  45.00 %    27.849 MB  32810\n2.594 s  30.00 %    27.849 MB  32810\n2.620 s  45.00 %    27.849 MB  32810\n2.654 s  30.00 %    27.849 MB  32810\n2.682 s  30.00 %    27.849 MB  32810\n2.708 s  30.00 %    27.849 MB  32810\n2.742 s  45.00 %    27.849 MB  32810\n2.769 s  30.00 %    27.849 MB  32810\n2.798 s  0.00 %     27.849 MB  32810\n2.823 s  30.00 %    27.849 MB  32810\n2.852 s  45.00 %    27.849 MB  32810\n2.880 s  30.00 %    27.849 MB  32810\n2.908 s  45.00 %    27.849 MB  32810\n2.935 s  30.00 %    27.849 MB  32810\n2.963 s  45.00 %    27.849 MB  32810\n2.991 s  45.00 %    27.849 MB  32810\n3.034 s  30.00 %    27.849 MB  32810\n3.069 s  45.00 %    27.849 MB  32810\n3.099 s  15.00 %    27.849 MB  32810\n3.151 s  30.00 %    27.849 MB  32810\n3.195 s  30.00 %    27.849 MB  32810\n3.200 s  15.00 %    27.849 MB  32810\n3.234 s  45.00 %    27.849 MB  32810\n3.259 s  30.00 %    27.849 MB  32810\n3.288 s  30.00 %    27.849 MB  32810\n3.324 s  30.00 %    27.849 MB  32810\n3.348 s  45.00 %    27.849 MB  32810\n3.372 s  30.00 %    27.849 MB  32810\n3.395 s  30.00 %    27.849 MB  32810\n3.428 s  45.00 %    27.849 MB  32810\n3.455 s  45.00 %    27.849 MB  32810\n3.479 s  45.00 %    27.849 MB  32810\n3.515 s  24.00 %    27.849 MB  32810\n3.550 s  48.00 %    27.849 MB  32810\n3.571 s  24.00 %    27.849 MB  32810\n3.598 s  36.00 %    27.849 MB  32810\n3.626 s  36.00 %    27.849 MB  32810\n3.659 s  24.00 %    27.849 MB  32810\n3.702 s  24.00 %    27.849 MB  32810\n3.727 s  24.00 %    27.849 MB  32810\n3.752 s  36.00 %    27.849 MB  32810\n3.791 s  24.00 %    27.849 MB  32810\n3.822 s  24.00 %    27.849 MB  32810\n3.897 s  12.00 %    27.849 MB  32810\n3.902 s  12.00 %    27.849 MB  32810\n3.945 s  48.00 %    27.849 MB  32810\n3.978 s  36.00 %    27.849 MB  32810\n4.016 s  36.00 %    27.849 MB  32810\n4.046 s  24.00 %    27.849 MB  32810\n4.074 s  24.00 %    27.849 MB  32810\n4.106 s  24.00 %    27.849 MB  32810\n4.136 s  0.00 %     27.849 MB  32810\n4.172 s  24.00 %    27.849 MB  32810\n4.209 s  24.00 %    27.849 MB  32810\n4.244 s  12.00 %    27.849 MB  32810\n4.269 s  12.00 %    27.849 MB  32810\n4.302 s  24.00 %    27.849 MB  32810\n4.330 s  24.00 %    27.849 MB  32810\n4.366 s  36.00 %    27.849 MB  32810\n4.392 s  24.00 %    27.849 MB  32810\n4.428 s  24.00 %    27.849 MB  32810\n4.460 s  24.00 %    27.849 MB  32810\n4.521 s  10.00 %    27.849 MB  32810\n4.556 s  10.00 %    27.849 MB  32810\n4.565 s  20.00 %    27.849 MB  32810\n4.602 s  20.00 %    27.849 MB  32810\n4.635 s  20.00 %    27.849 MB  32810\n4.666 s  20.00 %    27.849 MB  32810\n4.688 s  10.00 %    27.849 MB  32810\n4.729 s  30.00 %    27.849 MB  32810\n4.758 s  30.00 %    27.849 MB  32810\n4.784 s  20.00 %    27.849 MB  32810\n4.808 s  20.00 %    27.849 MB  32810\n4.836 s  30.00 %    27.849 MB  32810\n4.866 s  20.00 %    27.849 MB  32810\n4.907 s  30.00 %    27.849 MB  32810\n4.932 s  20.00 %    27.849 MB  32810\n4.955 s  20.00 %    27.849 MB  32810\n4.983 s  30.00 %    27.849 MB  32810\n5.011 s  20.00 %    27.849 MB  32810\n5.039 s  30.00 %    27.849 MB  32810\n5.067 s  20.00 %    27.849 MB  32810\n5.095 s  30.00 %    27.849 MB  32810\n5.123 s  20.00 %    27.849 MB  32810\n5.153 s  30.00 %    27.849 MB  32810\n5.181 s  20.00 %    27.849 MB  32810\n5.211 s  30.00 %    27.849 MB  32810\n5.240 s  20.00 %    27.849 MB  32810\n5.268 s  30.00 %    27.849 MB  32810\n5.296 s  30.00 %    27.849 MB  32810\n5.325 s  20.00 %    27.849 MB  32810\n5.354 s  30.00 %    27.849 MB  32810\n5.384 s  30.00 %    27.849 MB  32810\n5.411 s  20.00 %    27.849 MB  32810\n5.449 s  30.00 %    27.849 MB  32810\n5.480 s  20.00 %    27.849 MB  32810\n5.506 s  0.00 %     27.849 MB  32810\n5.543 s  17.14 %    27.849 MB  32810\n5.594 s  25.71 %    27.849 MB  32810\n5.618 s  8.57 %     27.849 MB  32810\n5.644 s  17.14 %    27.849 MB  32810\n5.669 s  17.14 %    27.849 MB  32810\n5.696 s  17.14 %    27.849 MB  32810\n5.735 s  25.71 %    27.849 MB  32810\n5.762 s  17.14 %    27.849 MB  32810\n5.784 s  17.14 %    27.849 MB  32810\n5.811 s  25.71 %    27.849 MB  32810\n5.841 s  17.14 %    27.849 MB  32810\n5.870 s  25.71 %    27.849 MB  32810\n5.897 s  17.14 %    27.849 MB  32810\n5.926 s  25.71 %    27.849 MB  32810\n5.957 s  25.71 %    27.849 MB  32810\n5.988 s  25.71 %    27.849 MB  32810\n6.020 s  25.71 %    27.849 MB  32810\n6.051 s  17.14 %    27.849 MB  32810\n6.083 s  25.71 %    27.849 MB  32810\n6.124 s  25.71 %    27.849 MB  32810\n6.146 s  17.14 %    27.849 MB  32810\n6.171 s  25.71 %    27.849 MB  32810\n6.199 s  17.14 %    27.849 MB  32810\n6.226 s  25.71 %    27.849 MB  32810\n6.262 s  25.71 %    27.849 MB  32810\n6.291 s  25.71 %    27.849 MB  32810\n6.311 s  17.14 %    27.849 MB  32810\n6.340 s  25.71 %    27.849 MB  32810\n6.367 s  17.14 %    27.849 MB  32810\n6.396 s  25.71 %    27.849 MB  32810\n6.424 s  17.14 %    27.849 MB  32810\n6.454 s  25.71 %    27.849 MB  32810\n6.483 s  17.14 %    27.849 MB  32810\n6.511 s  22.50 %    27.849 MB  32810\n6.539 s  15.00 %    27.849 MB  32810\n6.568 s  22.50 %    27.849 MB  32810\n6.597 s  22.50 %    27.849 MB  32810\n6.626 s  15.00 %    27.849 MB  32810\n6.659 s  22.50 %    27.849 MB  32810\n6.690 s  0.00 %     27.849 MB  32810\n6.719 s  15.00 %    27.849 MB  32810\n6.747 s  22.50 %    27.849 MB  32810\n6.776 s  15.00 %    27.849 MB  32810\n6.808 s  22.50 %    27.849 MB  32810\n6.841 s  22.50 %    27.849 MB  32810\n6.871 s  15.00 %    27.849 MB  32810\n6.899 s  22.50 %    27.849 MB  32810\n6.927 s  22.50 %    27.849 MB  32810\n6.974 s  30.00 %    27.849 MB  32810\n7.006 s  22.50 %    27.849 MB  32810\n7.029 s  15.00 %    27.849 MB  32810\n7.050 s  15.00 %    27.849 MB  32810\n7.078 s  15.00 %    27.849 MB  32810\n7.105 s  22.50 %    27.849 MB  32810\n7.137 s  30.00 %    27.849 MB  32810\n7.167 s  15.00 %    27.849 MB  32810\n7.195 s  22.50 %    27.849 MB  32810\n7.225 s  22.50 %    27.849 MB  32810\n7.254 s  22.50 %    27.849 MB  32810\n7.282 s  15.00 %    27.849 MB  32810\n7.319 s  7.50 %     27.881 MB  32810\n7.322 s  0.00 %     27.881 MB  32810\n```\n\n\u003c/details\u003e\n\n## Test vectors\n\nThe [bcrypt paper][paper] does not lists test vectors to test implementation but\na set of well known test vectors has been used.  \nThis package implements them [here][tvec].\n\n## API\n\n#### TOC\n\n\u003cdl\u003e\n\u003cdt\u003e\u003ca href=\"#hash\"\u003ehash(password, [options])\u003c/a\u003e ⇒ \u003ccode\u003ePromise.\u0026lt;string\u0026gt;\u003c/code\u003e\u003c/dt\u003e\n\u003cdd\u003e\u003cp\u003eComputes the hash string of the given password in the PHC format using bcrypt\npackage.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003ca href=\"#verify\"\u003everify(phcstr, password)\u003c/a\u003e ⇒ \u003ccode\u003ePromise.\u0026lt;boolean\u0026gt;\u003c/code\u003e\u003c/dt\u003e\n\u003cdd\u003e\u003cp\u003eDetermines whether or not the hash stored inside the PHC formatted string\nmatches the hash generated for the password provided.\u003c/p\u003e\n\u003c/dd\u003e\n\u003cdt\u003e\u003ca href=\"#identifiers\"\u003eidentifiers()\u003c/a\u003e ⇒ \u003ccode\u003eArray.\u0026lt;string\u0026gt;\u003c/code\u003e\u003c/dt\u003e\n\u003cdd\u003e\u003cp\u003eGets the list of all identifiers supported by this hashing function.\u003c/p\u003e\n\u003c/dd\u003e\n\u003c/dl\u003e\n\n\u003ca name=\"hash\"\u003e\u003c/a\u003e\n\n### hash(password, [options]) ⇒ \u003ccode\u003ePromise.\u0026lt;string\u0026gt;\u003c/code\u003e\nComputes the hash string of the given password in the PHC format using bcrypt\npackage.\n\n**Kind**: global function  \n**Returns**: \u003ccode\u003ePromise.\u0026lt;string\u0026gt;\u003c/code\u003e - The generated secure hash string in the PHC\nformat.  \n**Access**: public  \n\n| Param | Type | Default | Description |\n| --- | --- | --- | --- |\n| password | \u003ccode\u003estring\u003c/code\u003e |  | The password to hash. |\n| [options] | \u003ccode\u003eObject\u003c/code\u003e |  | Optional configurations related to the hashing function. |\n| [options.rounds] | \u003ccode\u003enumber\u003c/code\u003e | \u003ccode\u003e10\u003c/code\u003e | Optional Must be an integer within the range (`4` \u003c= `rounds` \u003c= `31`). |\n\n\u003ca name=\"verify\"\u003e\u003c/a\u003e\n\n### verify(phcstr, password) ⇒ \u003ccode\u003ePromise.\u0026lt;boolean\u0026gt;\u003c/code\u003e\nDetermines whether or not the hash stored inside the PHC formatted string\nmatches the hash generated for the password provided.\n\n**Kind**: global function  \n**Returns**: \u003ccode\u003ePromise.\u0026lt;boolean\u0026gt;\u003c/code\u003e - A boolean that is true if the hash computed\nfor the password matches.  \n**Access**: public  \n\n| Param | Type | Description |\n| --- | --- | --- |\n| phcstr | \u003ccode\u003estring\u003c/code\u003e | Secure hash string generated from this package. |\n| password | \u003ccode\u003estring\u003c/code\u003e | User's password input. |\n\n\u003ca name=\"identifiers\"\u003e\u003c/a\u003e\n\n### identifiers() ⇒ \u003ccode\u003eArray.\u0026lt;string\u0026gt;\u003c/code\u003e\nGets the list of all identifiers supported by this hashing function.\n\n**Kind**: global function  \n**Returns**: \u003ccode\u003eArray.\u0026lt;string\u0026gt;\u003c/code\u003e - A list of identifiers supported by this hashing function.  \n**Access**: public  \n\n## Related\n- [@phc/argon2][argon2] -\n🔒 Node.JS Argon2 password hashing algorithm following the PHC string format.\n- [@phc/scrypt][scrypt] -\n🔒 Node.JS scrypt password hashing algorithm following the PHC string format.\n- [@phc/pbkdf2][pbkdf2] -\n🔒 Node.JS PBKDF2 password hashing algorithm following the PHC string format.\n\n## Contributing\n\nContributions are REALLY welcome and if you find a security flaw in this code, PLEASE [report it][new issue].  \n\n## Authors\n\n- **Simone Primarosa** - *Github* ([@simonepri][github:simonepri]) • *Twitter* ([@simoneprimarosa][twitter:simoneprimarosa])\n\nSee also the list of [contributors][contributors] who participated in this project.\n\n## License\n\nThis project is licensed under the MIT License - see the [license][license] file for details.\n\n\u003c!-- Links --\u003e\n[start]: https://github.com/simonepri/phc-bcrypt#start-of-content\n[new issue]: https://github.com/simonepri/phc-bcrypt/issues/new\n[contributors]: https://github.com/simonepri/phc-bcrypt/contributors\n\n[license]: https://github.com/simonepri/phc-bcrypt/tree/master/license\n\n[tvec]: https://github.com/simonepri/phc-bcrypt/tree/master/test/vectors.js\n\n[argon2]: https://github.com/simonepri/phc-argon2\n[scrypt]: https://github.com/simonepri/phc-scrypt\n[pbkdf2]: https://github.com/simonepri/phc-pbkdf2\n\n[github:simonepri]: https://github.com/simonepri\n[twitter:simoneprimarosa]: http://twitter.com/intent/user?screen_name=simoneprimarosa\n\n[gh:sympact]: https://github.com/simonepri/sympact\n\n[specs:mcf]: https://github.com/ademarre/binary-mcf\n[specs:phc]: https://github.com/P-H-C/phc-string-format/blob/master/phc-sf-spec.md\n[specs:B64]: https://github.com/P-H-C/phc-string-format/blob/master/phc-sf-spec.md#b64\n[specs:salt]: https://en.wikipedia.org/wiki/Salt_(cryptography)\n[specs:bcrypt]: https://en.wikipedia.org/wiki/bcrypt\n\n[paper]: https://www.usenix.org/legacy/event/usenix99/provos/provos.pdf\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonepri%2Fphc-bcrypt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonepri%2Fphc-bcrypt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonepri%2Fphc-bcrypt/lists"}