Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
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.
32 changes: 30 additions & 2 deletions README.md
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)

0 comments on commit 5f7787b

Please sign in to comment.