{"_id":"fast-password-entropy","_rev":"9-a2676de943a65b60558670ddae97c356","name":"fast-password-entropy","dist-tags":{"latest":"1.1.1"},"versions":{"1.0.0":{"name":"fast-password-entropy","version":"1.0.0","description":"Calculate the entropy of a password string, but fast!","keywords":["password","string","entropy","strength"],"license":"MIT","author":{"name":"Gabriel Montes","email":"gabriel@bloq.com"},"files":["src/*"],"main":"src/index.js","repository":{"type":"git","url":"git+https://github.com/autonomoussoftware/fast-password-entropy.git"},"scripts":{"bench":"node benchmark/index.js","lint":"eslint --cache .","precommit":"npm run lint","test":"mocha","coverage":"nyc --lines 95 --functions 95 --branches 95 --reporter=lcov --reporter=text npm test","check":"npm-check -p -i eslint*","prepush":"npm run check && npm run coverage","prepublish":"npm run precommit && npm run prepush"},"devDependencies":{"benchmark":"^2.1.4","chai":"^4.0.0","eslint":"^4.1.0","eslint-config-bloq":"^1.0.0","eslint-config-standard":"^11.0.0-beta.0","eslint-plugin-import":"^2.8.0","eslint-plugin-jsdoc":"^3.5.0","eslint-plugin-node":"^6.0.0","eslint-plugin-promise":"^3.6.0","eslint-plugin-standard":"^3.0.1","husky":"^0.14.3","microtime":"^2.1.7","mocha":"^5.0.1","npm-check":"^5.5.2","nyc":"^11.0.0","passwd-strength":"^1.1.0","password-entropy":"0.0.3","password-strength":"0.0.1","random-words":"^1.0.0","randomstring":"^1.1.5","string-entropy":"0.0.2","tai-password-strength":"^1.1.1"},"engines":{"node":">=6.0.0"},"preferGlobal":false,"private":false,"gitHead":"25abf632e5238221267080ddc251d16b21bb1d2e","bugs":{"url":"https://github.com/autonomoussoftware/fast-password-entropy/issues"},"homepage":"https://github.com/autonomoussoftware/fast-password-entropy#readme","_id":"fast-password-entropy@1.0.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"gabmontes","email":"gabriel@utoctadel.com.ar"},"dist":{"integrity":"sha512-7XkP38H5hi9LGuWF+gIfwpiQ2agF4ZNCxXWtflevbVJQ7T2w9YmmS90t0f/kvitidbLapoh+Ut9XGLOxW6CDRQ==","shasum":"6c070b9fe14af83f0e55411719c4835643c25aed","tarball":"https://registry.npmjs.org/fast-password-entropy/-/fast-password-entropy-1.0.0.tgz","fileCount":3,"unpackedSize":6756,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEuQw1bq2zlJ5jxZK4n+X4jfqc6sqxTqiIkQadX2LPO7AiAgS0jXX/ebGPwmHLnpQaVOVhT8/PcTVuvqUX0JBcT/Sw=="}]},"maintainers":[{"name":"gabmontes","email":"gabriel@utoctadel.com.ar"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fast-password-entropy_1.0.0_1520912309915_0.4395851207349837"},"_hasShrinkwrap":false},"1.1.0":{"name":"fast-password-entropy","version":"1.1.0","description":"Calculate the entropy of a password string, but fast!","keywords":["password","string","entropy","strength"],"license":"MIT","author":{"name":"Gabriel Montes","email":"gabriel@bloq.com"},"files":["dist","src"],"main":"src/index.js","browser":"es5/index.js","repository":{"type":"git","url":"git+https://github.com/autonomoussoftware/fast-password-entropy.git"},"scripts":{"bench":"node benchmark/index.js","build":"babel -d es5/ src/","check":"npm-check -p -i eslint*","coverage":"nyc --lines 95 --functions 95 --branches 95 --reporter=lcov --reporter=text npm test","lint":"eslint --cache .","precommit":"npm run lint","prepublishOnly":"npm run build && npm run precommit && npm run prepush && tag-matches","prepush":"npm run check && npm run coverage","test":"mocha"},"devDependencies":{"babel-cli":"^6.26.0","babel-preset-env":"^1.6.1","benchmark":"^2.1.4","chai":"^4.0.0","check-tag-matches":"^1.0.0","eslint":"^4.1.0","eslint-config-bloq":"^1.0.0","eslint-config-standard":"^11.0.0-beta.0","eslint-plugin-import":"^2.8.0","eslint-plugin-jsdoc":"^3.5.0","eslint-plugin-node":"^6.0.0","eslint-plugin-promise":"^3.6.0","eslint-plugin-standard":"^3.0.1","husky":"^0.14.3","microtime":"^2.1.7","mocha":"^5.0.1","npm-check":"^5.5.2","nyc":"^11.0.0","passwd-strength":"^1.1.0","password-entropy":"0.0.3","password-strength":"0.0.1","random-words":"^1.0.0","randomstring":"^1.1.5","string-entropy":"0.0.2","tai-password-strength":"^1.1.1"},"preferGlobal":false,"private":false,"gitHead":"c2595c4b5730f1b4576eb1c68dcfaad3fea85624","bugs":{"url":"https://github.com/autonomoussoftware/fast-password-entropy/issues"},"homepage":"https://github.com/autonomoussoftware/fast-password-entropy#readme","_id":"fast-password-entropy@1.1.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.4","_npmUser":{"name":"gabmontes","email":"gabriel@utoctadel.com.ar"},"dist":{"integrity":"sha512-cZ5ih5tjUC3Nx4cZUnvLRz6pGEwPe2Dm7LOhWm0y0fFLqWpHxVvYmoLwD68caFv6QCVA+eOZ9ifZyB4QAbUzJA==","shasum":"590cc89c5dc9b523b26f57ef7b6ca75a9d1d0bfb","tarball":"https://registry.npmjs.org/fast-password-entropy/-/fast-password-entropy-1.1.0.tgz","fileCount":5,"unpackedSize":10704,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCOvMksmmakPKe4zYvLOafzh/3+G2BfKJYTbJo0H7Ur6AIgKTf9wlkCs/db0EzzEjexcnQu1njV+uIuMxXt/G3ataI="}]},"maintainers":[{"email":"gabriel@utoctadel.com.ar","name":"gabmontes"},{"email":"ignacio.anaya89@gmail.com","name":"ianaya89"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fast-password-entropy_1.1.0_1521040879129_0.7298661276818867"},"_hasShrinkwrap":false},"1.1.1":{"name":"fast-password-entropy","version":"1.1.1","description":"Calculate the entropy of a password string, but fast!","keywords":["password","string","entropy","strength"],"license":"MIT","author":{"name":"Gabriel Montes","email":"gabriel@bloq.com"},"main":"src/index.js","browser":"es5/index.js","repository":{"type":"git","url":"git+https://github.com/autonomoussoftware/fast-password-entropy.git"},"scripts":{"bench":"node benchmark/index.js","build":"babel -d es5/ src/","check":"npm-check -p -i eslint*","coverage":"nyc --lines 95 --functions 95 --branches 95 --reporter=lcov --reporter=text npm test","lint":"eslint --cache .","precommit":"npm run lint","prepublishOnly":"npm run build && npm run precommit && npm run prepush && tag-matches","prepush":"npm run check && npm run coverage","test":"mocha"},"devDependencies":{"babel-cli":"^6.26.0","babel-preset-env":"^1.7.0","benchmark":"^2.1.4","chai":"^4.0.0","check-tag-matches":"^1.0.0","eslint":"^5.15.3","eslint-config-bloq":"^2.1.0","eslint-config-standard":"^12.0.0","eslint-plugin-import":"^2.12.0","eslint-plugin-jsdoc":"^4.4.2","eslint-plugin-node":"^8.0.1","eslint-plugin-promise":"^4.0.1","eslint-plugin-require-path-exists":"^1.1.9","eslint-plugin-standard":"^4.0.0","husky":"^1.3.1","microtime":"^3.0.0","mocha":"^6.0.2","npm-check":"^5.7.1","nyc":"^13.3.0","passwd-strength":"^1.1.0","password-entropy":"0.0.3","password-strength":"0.0.1","random-words":"^1.1.0","randomstring":"^1.1.5","string-entropy":"0.0.2","tai-password-strength":"^1.1.1"},"preferGlobal":false,"private":false,"gitHead":"132eab735de74af4b48a8fe416a6a377d30d9701","bugs":{"url":"https://github.com/autonomoussoftware/fast-password-entropy/issues"},"homepage":"https://github.com/autonomoussoftware/fast-password-entropy#readme","_id":"fast-password-entropy@1.1.1","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"gabmontes","email":"gabriel@utoctadel.com.ar"},"dist":{"integrity":"sha512-dxm29/BPFrNgyEDygg/lf9c2xQR0vnQhG7+hZjAI39M/3um9fD4xiqG6F0ZjW6bya5m9CI0u6YryHGRtxCGCiw==","shasum":"47ba9933095fd5a32fb184915fc8e76ee19cf429","tarball":"https://registry.npmjs.org/fast-password-entropy/-/fast-password-entropy-1.1.1.tgz","fileCount":5,"unpackedSize":11743,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcnnDcCRA9TVsSAnZWagAA4wkP/0HdqxZ/RH8hOeJwKYD4\nKwbIG02CriNtpxhNQ8FPHq0294IvCsjspzcsqlPEBz7XhhNP/VHu8IAVs5D/\nNMU4MsXBECqFCT1+SsCVh3C47r/f2uvlrs/DKQiWb+bMdxpBdG7gsj+u8Wjj\niIlSGl6DyVmPQ4F8+AdCeGpaqSTZGKOHjUMeOQvxuUR/NkmFltBaoIxxW1rL\nkuawP9EnlxAqDPDSln5QxkFa2ukkp8Yn/ARAHjqGvNb84cNFU/kx6tuRjjx3\nN94qmxP67dkhxyxDLirihac6i2yej6LEZnqY049f1DQKn/x8ZDeDe4N6VNiU\niM2IADP/em4xZ150iSoYMyWFepJN+91rDF+gHuZCcIM1Ve+d8qh4bQDL+rJy\nexeLiNf5fqd9pbDjavpovBHpl60+oVeWVjehSy0/rFUAQY7Bh+Kp5DcK9f9w\nto7Uy2a+w89aiKLJ/66svhzaLuiscVIeAFgn8GiA7r+q47I6Ax445t4Un4MK\neFKmsjuztP+O4xcN/5pZhFeaWiuzwtTb+X7/33uK18TA8CiNbOTV7lf6p29/\n9x24Suxwxza7oauNNiWsKtfYva7z0tU9kwxEnh5xvKwMwxwJWlwnZ3AA3zNk\nV7Jkjf/M9a4fogJxj4Dsjqws6uh8FlgyYE2ZX3sBFNlAh04W/2uDfjL7JSRQ\nudr3\r\n=5vck\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDSduvin6XXo6hSF2LqA/qWHtuTIRupakVQhkNBeQN2YAiBVw9MUmsc39oqLvShbd4Ssg74/Yml1UGXfaurbRM3uSA=="}]},"maintainers":[{"email":"gabriel@utoctadel.com.ar","name":"gabmontes"},{"email":"ignacio.anaya89@gmail.com","name":"ianaya89"},{"email":"pabloenrici@gmail.com","name":"pabloen"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fast-password-entropy_1.1.1_1553887450184_0.9503567487174858"},"_hasShrinkwrap":false}},"time":{"created":"2018-03-13T03:38:29.915Z","1.0.0":"2018-03-13T03:38:29.965Z","modified":"2023-09-08T20:33:44.176Z","1.1.0":"2018-03-14T15:21:19.205Z","1.1.1":"2019-03-29T19:24:10.307Z"},"maintainers":[{"email":"gonzalo.n.delia@gmail.com","name":"gndelia"},{"email":"gabriel@utoctadel.com.ar","name":"gabmontes"}],"description":"Calculate the entropy of a password string, but fast!","homepage":"https://github.com/autonomoussoftware/fast-password-entropy#readme","keywords":["password","string","entropy","strength"],"repository":{"type":"git","url":"git+https://github.com/autonomoussoftware/fast-password-entropy.git"},"author":{"name":"Gabriel Montes","email":"gabriel@bloq.com"},"bugs":{"url":"https://github.com/autonomoussoftware/fast-password-entropy/issues"},"license":"MIT","readme":"# fast-password-entropy\n\n[![Build Status](https://travis-ci.org/autonomoussoftware/fast-password-entropy.svg?branch=master)](https://travis-ci.org/autonomoussoftware/fast-password-entropy)\n[![bitHound Overall Score](https://www.bithound.io/github/autonomoussoftware/fast-password-entropy/badges/score.svg)](https://www.bithound.io/github/autonomoussoftware/fast-password-entropy)\n[![bitHound Code](https://www.bithound.io/github/autonomoussoftware/fast-password-entropy/badges/code.svg)](https://www.bithound.io/github/autonomoussoftware/fast-password-entropy)\n[![Code Style](https://img.shields.io/badge/code%20style-bloq-0063a6.svg)](https://github.com/bloq/eslint-config-bloq)\n[![Known Vulnerabilities](https://snyk.io/test/github/autonomoussoftware/fast-password-entropy/badge.svg?targetFile=package.json)](https://snyk.io/test/github/autonomoussoftware/fast-password-entropy:package.json) [![Greenkeeper badge](https://badges.greenkeeper.io/autonomoussoftware/fast-password-entropy.svg)](https://greenkeeper.io/)\n\nCalculate the entropy bits of a string as a quick proxy to password strength.\n\nSee [Entropy as a measure of password strength](https://en.wikipedia.org/wiki/Password_strength#Entropy_as_a_measure_of_password_strength) for more information.\n\n## Installation\n\n```bash\n$ npm install --save fast-password-entropy\n```\n\n## Usage\n\n```js\nconst stringEntropy = require('fast-password-entropy')\n\nconsole.log(stringEntropy('1234')) // 13\nconsole.log(stringEntropy('password')) // 38\n```\n\n### ES5 support\n\nA transpiled version is available in `es5/index.js`. To use that specific version, this syntax is also supported:\n\n```js\nvar stringEntropy = require('fast-password-entropy/es5');\n```\n\n## Research\n\nSeveral libraries were analyzed before creating this one. Some of those are listed below, along with the drawbacks found for each one.\n\n[`information-entropy`](https://www.npmjs.com/package/information-entropy): Too basic. Cannot extract charset length from the string being tested.\n\n[`joi-password-complexity`](https://github.com/kamronbatman/joi-password-complexity): Interesting but not providing raw entropy information.\n\n[`passwd-strength`](https://github.com/tcort/passwd-strength): Values are correct but is too slow.\n\n[`password-entropy`](https://www.npmjs.com/package/password-entropy): Entropy calculation is not following any standard so results are very different from other libs.\n\n[`password-strength`](https://github.com/yuehu/password-strength): Only giving \"simple\", \"medium\", \"strong\" values.\n\n[`string-entropy`](https://github.com/mvhenten/string-entropy): Provides good entropy values but is slow.\n\n[`tai-password-strength`](https://github.com/tests-always-included/password-strength): Very complex and results are not fully matching the expected results.\n\n[`zxcvbn`](https://github.com/dropbox/zxcvbn): Uses comprehensive heuristics to estimate complexity but solves a much more complex problem instead.\n\n## Benchmark\n\nAfter the research, only three libraries were analyzed in detail and benchmarked. This library results are 3.5x faster than the existing libraries.\n\n```\n$ npm run bench\n\nTest strings [ '',\n  '8646',\n  'xtcmFWoH',\n  'Lp2x0P1iMEPWZKaQ',\n  'escape piece useful cloth',\n  'needle excitement over aloud price among',\n  'topic contain anything political great thank dawn among butter doll fought end' ]\n\nResults for `fast-password-entropy`   [ 0, 13, 46, 95, 147, 235, 459 ]\nResults for `passwd-strength`       [ 0, 13, 46, 95, 147, 235, 459 ]\nResults for `password-entropy`      [ 1, 1, 3, 10, 10, 10, 10 ]\nResults for `string-entropy`        [ 0, 13, 46, 95, 118, 188, 367 ]\nResults for `tai-password-strength` [ 0, 6, 24, 62, 87, 152, 312 ]\n\nBenchmarking...\nfast-password-entropy x 557,198 ops/sec ±1.27% (87 runs sampled)\npasswd-strength x 1,732 ops/sec ±4.36% (81 runs sampled)\nstring-entropy x 143,412 ops/sec ±3.92% (83 runs sampled)\ntai-password-strength x 11,590 ops/sec ±1.28% (86 runs sampled)\n\nFastest is fast-password-entropy\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}