Download the PHP package icawebdesign/hibp-php without Composer

On this page you can find all versions of the php package icawebdesign/hibp-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package hibp-php

PHP library for Have I Been Pwned and Pwned Passwords.

Latest Stable Version Total Downloads codecov License

HIBP-PHP is a composer library for accessing the Have I Been Pwned and Pwned Passwords APIs (currently v3).

The HIBP API now requires an API Key that needs to be purchased at the HIBP site for any lookups that use an email address. This currently means that if you're only using this package for lookups from the PwnedPassword section of the API, then an API key isn't required.

Version 5.x has dropped support for older PHP versions (< 7.4). If you still need a version of this package to run on an older PHP version, then please use the icawebdesign/hibp-php:^4.0 tag, though the 4.x branch will no longer receive updates.

Version 6.x now requires PHP 8.1+. If you need to support previous versions of PHP, please use the icawebdesign/hibp-php:^5.0 tag. This version however, will only receive security fixes.

Requirements

Installation

ReadOnly properties

Now that we're targetting a minimum of PHP 8.1, this gives us the ability to utilise ReadOnly properties in objects. With this, entity getters have been removed and properties can now be accessed directly on the object.

Usage examples for Breach Sites data

Get all breach sites

This will return a Collection of BreachSiteEntity objects.

Or we can filter for a domain the breach was listed in:

This will return a Collection of BreachSiteEntity objects.

Get single breach site

This will return a single BreachSiteEntity.

Get list of data classes for breach sites

This will return an array of Data Classes, eg;

Get data for a breached email account

We can retrieve unverified accounts too by specifying true for the second param (not retrieved by default):

We can also filter results back to a specific breached domain by adding a domain as the 3rd param

These calls will return a Collection of BreachSiteEntity objects.

Usage examples for Pwned Passwords

The PwnedPasswd methods can now take a second param of an array to specify GuzzleHttp request options.

Get number of times the start of a hash appears in the system matching against a full hash

This will return an int of the count.

You can also check against NTLM hashes:

Get number of times the start of a hash appears in the system as above, but with padded values to help prevent fingerprinting

You can also check against NTLM hashes:

This will return a Collection of PwnedPassword model objects.

Get a collection of hash data from a start of a hash and matching against a full hash

This will return a Collection of PwnedPassword model objects.

Get a collection of hash data from a start of a hash and matching against a full hash as above, but with padded values to help prevent fingerprinting

This will return a Collection of PwnedPassword model objects.

Usage examples for Paste lists

Get a collection of pastes that a specified email account has appeared in

This will return a Collection of PasteEntity objects.

Laravel specifics

If using the package within a Laravel application, you can use the provided facades. First, you need to add your HIBP API key to your .env file, or your preferred method for adding values to your server environment variables.

You can then use the facades to call the relevant methods:

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

Thank you to Artem Fomenko for being the first external contributor to the package providing request options for Guzzle for the PwnedPassword methods.

License

The MIT License (MIT). Please see License File for more information.


All versions of hibp-php with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1||^8.2||^8.3
guzzlehttp/guzzle Version ^7.5
symfony/yaml Version ^6.1||^7.0
nesbot/carbon Version ^2.63||^3.0
ext-json Version *
illuminate/collections Version ^8.0||^9.43||^10.0||^11.0
psr/http-message Version ^1.0||^2.0
guzzlehttp/psr7 Version ^2.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package icawebdesign/hibp-php contains the following files

Loading the files please wait ....