2017 © Pedro Peláez
 

library pwned-passwords

A library to query Troy Hunt's Pwned Passwords service to see whether or not a password has been included in a public breach.

image

ron-maxweb/pwned-passwords

A library to query Troy Hunt's Pwned Passwords service to see whether or not a password has been included in a public breach.

  • Sunday, April 8, 2018
  • by ron-maxweb
  • Repository
  • 1 Watchers
  • 13 Stars
  • 21 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 5 Versions
  • 200 % Grown

The README.md

PwnedPasswords

A library to query Troy Hunt's Pwned Passwords service to see whether or not a password has been included in a public breach., (*1)

Requirements

  • PHP >= 7.2

Installation

Installing PwnedPasswords is made easy via Composer. Just require the package using the command below, and you are ready to go., (*2)

composer require mxrxdxn/pwned-passwords

Usage

To use the library, you can do something along the lines of the following., (*3)

require_once('vendor/autoload.php');

$pp = new PwnedPasswords\PwnedPasswords;

$password = '123456789';

$insecure = $pp->isPwned($password); //returns true or false

The isInsecure method will return true if the password has been found in the PwnedPasswords API, and false if not., (*4)

If you want to build your own thresholds (Ex. display a warning if the password has been found more than once and an error if more than 5x) you can call the isPwned method like below., (*5)

$pp = new PwnedPasswords\PwnedPasswords;

$password = '123456789';

$insecure = $pp->isPwned($password, true);

if ($insecure) {
    echo 'Oh no — pwned!' . "\n";
    echo sprintf('This password has been seen %d time%s before.', $insecure, ($insecure > 1 ? 's' : ''));
} else {
    echo 'All good!';
}

Issues

Please feel free to use the Github issue tracker to post any issues you have with this library., (*6)

The Versions

08/04 2018

dev-master

9999999-dev

A library to query Troy Hunt's Pwned Passwords service to see whether or not a password has been included in a public breach.

  Sources   Download

MIT

The Requires

  • ext-curl *
  • php >=7.1.3

 

by Saif Eddin Gmati (azjezz)

security password passwords

23/03 2018

v1.2.0

1.2.0.0

A library to query Troy Hunt's Pwned Passwords service to see whether or not a password has been included in a public breach.

  Sources   Download

MIT

The Requires

  • php >=7.1.3
  • ext-curl *

 

by Saif Eddin Gmati (azjezz)

security password passwords

22/03 2018

v1.1.0

1.1.0.0

A library to query Troy Hunt's Pwned Passwords service to see whether or not a password has been included in a public breach.

  Sources   Download

MIT

The Requires

  • php >=7.0.0
  • ext-curl *

 

by Saif Eddin Gmati (azjezz)

security password passwords

23/02 2018

v1.0.1

1.0.1.0

A library to query Troy Hunt's Pwned Passwords service to see whether or not a password has been included in a public breach.

  Sources   Download

MIT

The Requires

  • php >=5.0.0
  • ext-curl *

 

security password passwords

23/02 2018

v1.0.0

1.0.0.0

A library to query Troy Hunt's Pwned Passwords service to see whether or not a password has been included in a public breach.

  Sources   Download

MIT

The Requires

  • php >=5.0.0

 

security password passwords