PHPackages                             mindplay/blowfish - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. mindplay/blowfish

AbandonedArchivedLibrary[Security](/categories/security)

mindplay/blowfish
=================

Wrapper around the Blowfish algorithm (for use in password encryption, etc.)

1.0.0(11y ago)125LGPL-3.0+PHPPHP &gt;=5.3.7

Since Oct 25Pushed 11y ago1 watchersCompare

[ Source](https://github.com/mindplay-dk/blowfish)[ Packagist](https://packagist.org/packages/mindplay/blowfish)[ RSS](/packages/mindplay-blowfish/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

mindplay/blowfish
-----------------

[](#mindplayblowfish)

[![Build Status](https://camo.githubusercontent.com/2c90ddf762be6d71ec4a9ca64bbdf2646317a05e0eb42dd51bbfbc5c658b405c/68747470733a2f2f7472617669732d63692e6f72672f6d696e64706c61792d646b2f626c6f77666973682e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/mindplay-dk/blowfish)

I want Blowfish password encryption, which is currently the best available.

I also want:

- Strong, fast entropy: mcrypt when available, fall back to dev/urandom or `mt_rand()`
- Variable cost: prioritize speed vs cipher strength depending on your needs
- Ease of use and a small, simple dependency

I do not want a large, complicated password encryption framework - I feel quite comfortable having a hard dependency on a public API consisting of two methods:

```
public function hash($value): string;
public function check($value, $hash): bool;

```

Replacing this with something else in the future would be trivial.

You need php version **5.3.7** or newer for working Blowfish implementation - prior versions had a [broken Blowfish implementation](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-2483).

Usage
-----

[](#usage)

Trivial:

```
    $service = new BlowfishService();

    $password = '$up3rS3c3tp@55w0rD';

    $hash = $service->hash($password); // encrypt the password

    $is_valid = $service->check($password, $hash); // check the password
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4222d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9445f567f43ee7a963270651e40e533634586f959e4df3d5398d001b1cb49be8?d=identicon)[mindplay.dk](/maintainers/mindplay.dk)

---

Top Contributors

[![mindplay-dk](https://avatars.githubusercontent.com/u/103348?v=4)](https://github.com/mindplay-dk "mindplay-dk (5 commits)")

### Embed Badge

![Health badge](/badges/mindplay-blowfish/health.svg)

```
[![Health](https://phpackages.com/badges/mindplay-blowfish/health.svg)](https://phpackages.com/packages/mindplay-blowfish)
```

###  Alternatives

[defuse/php-encryption

Secure PHP Encryption Library

3.9k162.4M214](/packages/defuse-php-encryption)[roave/security-advisories

Prevents installation of composer packages with known security vulnerabilities: no API, simply require it

2.9k97.3M6.4k](/packages/roave-security-advisories)[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k16.7M113](/packages/mews-purifier)[robrichards/xmlseclibs

A PHP library for XML Security

41278.1M118](/packages/robrichards-xmlseclibs)[bjeavons/zxcvbn-php

Realistic password strength estimation PHP library based on Zxcvbn JS

86917.5M63](/packages/bjeavons-zxcvbn-php)[enlightn/security-checker

A PHP dependency vulnerabilities scanner based on the Security Advisories Database.

33732.2M110](/packages/enlightn-security-checker)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
