-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve information on readme.
- Loading branch information
Esolitos Marlon
authored
Feb 26, 2018
1 parent
bd54c82
commit 5f7787b
Showing
1 changed file
with
30 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,30 @@ | ||
# pwnedpasswords | ||
Generic service to query Troy's pwnedpasswords.com service. | ||
# `esolitos/pwnedpasswords`: Check how broken is your password | ||
|
||
Generic php service built to query Troy Hunt's https://pwnedpasswords.com API service and let you know how "broken" is your password, *without actually sending your password*. | ||
|
||
More info about this on Troy's [first blog post](https://www.troyhunt.com/introducing-306-million-freely-downloadable-pwned-passwords/) _(about Pwned Passwords v1)_, the [follow up post](https://www.troyhunt.com/ive-just-launched-pwned-passwords-version-2/) _(about v2, the version used by this library)_ and finally [the post on Cloudflare](https://blog.cloudflare.com/validating-leaked-passwords-with-k-anonymity/) blog _(in which k-anonymity is explained in depth)_. | ||
|
||
## Installation | ||
|
||
Via composer: `composer require esolitos/pwnedpasswords` | ||
|
||
## Usage | ||
|
||
The usage is very simple, just create the object and call | ||
|
||
```php | ||
$mySafePassword = 'p@ssword'; | ||
|
||
$validator = Esolitos\PwnedPasswords\PwnageValidator(); | ||
$pwnedCount = $validator->getPasswordPwnage($mySafePassword); | ||
|
||
print_r($pwnedCount) | ||
|
||
> 47205 | ||
|
||
``` | ||
|
||
|
||
### _Bonus points: Drupal module_ | ||
|
||
This library was initially built for the drupal module: [Pwned Passwords](https://www.drupal.org/project/pwned_passwords) |