{"id":13622918,"url":"https://github.com/bjeavons/zxcvbn-php","last_synced_at":"2025-04-15T10:31:59.762Z","repository":{"id":12403001,"uuid":"15056276","full_name":"bjeavons/zxcvbn-php","owner":"bjeavons","description":"Realistic PHP password strength estimate library based on Zxcvbn JS","archived":false,"fork":false,"pushed_at":"2025-02-24T16:48:21.000Z","size":2728,"stargazers_count":846,"open_issues_count":26,"forks_count":115,"subscribers_count":26,"default_branch":"master","last_synced_at":"2025-04-09T13:42:08.946Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","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/bjeavons.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-12-09T19:04:35.000Z","updated_at":"2025-04-08T18:21:11.000Z","dependencies_parsed_at":"2024-06-18T10:45:27.451Z","dependency_job_id":"b0a9c63e-2bdb-4a52-b68e-7e176c83e542","html_url":"https://github.com/bjeavons/zxcvbn-php","commit_stats":{"total_commits":201,"total_committers":14,"mean_commits":"14.357142857142858","dds":0.7064676616915423,"last_synced_commit":"f6a82aee681f5aa10037c4db47319c78a8d20910"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjeavons%2Fzxcvbn-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjeavons%2Fzxcvbn-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjeavons%2Fzxcvbn-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjeavons%2Fzxcvbn-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bjeavons","download_url":"https://codeload.github.com/bjeavons/zxcvbn-php/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249051696,"owners_count":21204868,"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":[],"created_at":"2024-08-01T21:01:25.725Z","updated_at":"2025-04-15T10:31:59.756Z","avatar_url":"https://github.com/bjeavons.png","language":"PHP","funding_links":[],"categories":["密码","目录","Table of Contents","PHP","密码 Passwords","Passwords","密码( Passwords )"],"sub_categories":["密码 Passwords","Passwords","Globalization"],"readme":"Zxcvbn-PHP is a password strength estimator using pattern matching and minimum entropy calculation. Zxcvbn-PHP is based on the [the Javascript zxcvbn project](https://github.com/dropbox/zxcvbn) from [Dropbox and @lowe](https://blogs.dropbox.com/tech/2012/04/zxcvbn-realistic-password-strength-estimation/). \"zxcvbn\" is bad password, just like \"qwerty\" and \"123456\".\n\n\u003ezxcvbn attempts to give sound password advice through pattern matching and conservative entropy calculations. It finds 10k common passwords, common American names and surnames, common English words, and common patterns like dates, repeats (aaa), sequences (abcd), and QWERTY patterns.\n\n[![Build Status](https://travis-ci.org/bjeavons/zxcvbn-php.png?branch=master)](https://travis-ci.org/bjeavons/zxcvbn-php)\n[![Coverage Status](https://coveralls.io/repos/github/bjeavons/zxcvbn-php/badge.svg?branch=master)](https://coveralls.io/github/bjeavons/zxcvbn-php?branch=master)\n[![Latest Stable Version](https://poser.pugx.org/bjeavons/zxcvbn-php/v/stable)](https://packagist.org/packages/bjeavons/zxcvbn-php)\n[![License](https://poser.pugx.org/bjeavons/zxcvbn-php/license)](https://packagist.org/packages/bjeavons/zxcvbn-php)\n\n## Installation\n\nThe library can be installed with [Composer](http://getcomposer.org) by adding it as a dependency to your composer.json file.\n\nVia the command line run:\n`composer require bjeavons/zxcvbn-php`\n\nOr in your composer.json add\n```json\n{\n    \"require\": {\n        \"bjeavons/zxcvbn-php\": \"^1.0\"\n    }\n}\n```\n\nThen run `composer update` on the command line and include the\nautoloader in your PHP scripts so that the ZxcvbnPhp class is available.\n\n```php\nrequire_once 'vendor/autoload.php';\n```\n\n## Usage\n\n```php\nuse ZxcvbnPhp\\Zxcvbn;\n\n$userData = [\n  'Marco',\n  'marco@example.com'\n];\n\n$zxcvbn = new Zxcvbn();\n$weak = $zxcvbn-\u003epasswordStrength('password', $userData);\necho $weak['score']; // will print 0\n\n$strong = $zxcvbn-\u003epasswordStrength('correct horse battery staple');\necho $strong['score']; // will print 4\n\necho $weak['feedback']['warning']; // will print user-facing feedback on the password, set only when score \u003c= 2\n// $weak['feedback']['suggestions'] may contain user-facing suggestions to improve the score\n```\n\nScores are integers from 0 to 4:\n* 0 means the password is extremely guessable (within 10^3 guesses), dictionary words like 'password' or 'mother' score a 0\n* 1 is still very guessable (guesses \u003c 10^6), an extra character on a dictionary word can score a 1\n* 2 is somewhat guessable (guesses \u003c 10^8), provides some protection from unthrottled online attacks\n* 3 is safely unguessable (guesses \u003c 10^10), offers moderate protection from offline slow-hash scenario\n* 4 is very unguessable (guesses \u003e= 10^10) and provides strong protection from offline slow-hash scenario\n\n### Acknowledgements\nThanks to:\n* @lowe for the original [Javascript Zxcvbn](https://github.com/lowe/zxcvbn)\n* [@Dreyer's port](https://github.com/Dreyer/php-zxcvbn) for reference for initial implementation\n* [@mkopinsky](https://github.com/mkopinsky) for major updates to keep in sync with upstream scoring\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbjeavons%2Fzxcvbn-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbjeavons%2Fzxcvbn-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbjeavons%2Fzxcvbn-php/lists"}