Download the PHP package shamimstack/breach-php without Composer

On this page you can find all versions of the php package shamimstack/breach-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 breach-php

BreachPHP

Enterprise-grade password breach detection for PHP 8.4+ and Laravel 13+ using the Have I Been Pwned (HIBP) k-Anonymity API.

PHP Version Laravel Tests Packagist Downloads


Overview

BreachPHP is a modern, framework-friendly PHP package that helps detect whether a password has appeared in known data breaches without ever sending the plaintext password over the network.

The package uses the Have I Been Pwned (HIBP) Pwned Passwords API with the k-Anonymity model, ensuring only the first five characters of the password's SHA-1 hash are transmitted.

Beyond simple API integration, BreachPHP provides an extensible architecture with optional local storage, offline lookups for previously synchronized data, Laravel integration, health diagnostics, and developer tooling.


Features


Why BreachPHP?

Most password breach libraries simply call the HIBP API and return a response.

BreachPHP goes further by providing:


Installation

The package automatically includes php-http/guzzle7-adapter for HTTP communication with the HIBP API — no additional HTTP client setup is required.

Publish the configuration file:

Publish migrations:

Run migrations:


Configuration

All configuration options can be set via .env variables or by publishing and editing config/breach.php:

Key Default Env Variable Description
provider "hibp" BREACH_PROVIDER Breach data source
storage "database" BREACH_STORAGE Storage driver: "database", "sqlite", "none"
cache "array" BREACH_CACHE Cache driver: "array", "redis", "psr16", "laravel"
timeout 10 BREACH_TIMEOUT HTTP request timeout (seconds)
connect_timeout 5 BREACH_CONNECT_TIMEOUT HTTP connect timeout (seconds)
retries 3 BREACH_RETRIES Number of HTTP retries
retry_delay 250 BREACH_RETRY_DELAY Delay between retries (milliseconds)
store_prefixes true BREACH_STORE_PREFIXES Auto-store prefix responses locally
table_prefix "breachphp_" BREACH_TABLE_PREFIX Database table name prefix
queue.enabled false BREACH_QUEUE_ENABLED Enable Laravel queue support
queue.connection env QUEUE_CONNECTION BREACH_QUEUE_CONNECTION Queue connection name

Quick Start


Pure PHP


Laravel Validation

Or with custom message:


Response


Offline Engine

BreachPHP supports building a local breach database over time.

Lookup order:

Previously synchronized prefixes remain available even if the HIBP service is temporarily unavailable.


Artisan Commands

Check Password

Synchronize

Warmup

Health

Doctor

Test

Statistics

Verify Storage

Optimize Database

Clear Cache

Prune


Storage Drivers

Supported storage drivers include:

Cache Drivers


Architecture

The package is organized into dedicated components:

This separation keeps the package maintainable, testable, and easy to extend.


Testing

The package uses:

Target:


Documentation

Complete documentation is available in the docs/ directory.

Topics include:


Roadmap

Version 1.0

Version 1.1

Version 1.2

Version 2.0


Security


Contributing

Contributions are welcome.

Please read:

before opening a pull request.


License

This package is open-sourced software licensed under the MIT License.

See LICENSE.md for details.


Author

ShamimStack

GitHub: https://github.com/shamimstack


Acknowledgements


BreachPHP aims to become the standard password breach detection library for the PHP ecosystem by combining strong security practices, a clean developer experience, and an extensible enterprise-grade architecture.


All versions of breach-php with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
ext-hash Version *
ext-mbstring Version *
php-http/discovery Version ^1.0
php-http/guzzle7-adapter Version ^1.0
psr/http-client Version ^1.0
psr/http-message Version ^1.0|^2.0
psr/simple-cache Version ^1.0|^2.0|^3.0
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 shamimstack/breach-php contains the following files

Loading the files please wait ...