PHPackages                             ahmed-j-alsarem/laravel-bcrypt-password - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. ahmed-j-alsarem/laravel-bcrypt-password

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

ahmed-j-alsarem/laravel-bcrypt-password
=======================================

A Laravel package for bcrypt password hashing functionality

v2.0.4(1y ago)0326MITPHPPHP ^7.4|^8.0

Since Apr 23Pushed 1y agoCompare

[ Source](https://github.com/AHMED-J-ALSAREM/LaravelBcryptPassword)[ Packagist](https://packagist.org/packages/ahmed-j-alsarem/laravel-bcrypt-password)[ RSS](/packages/ahmed-j-alsarem-laravel-bcrypt-password/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (5)Versions (12)Used By (0)

Laravel Bcrypt Password
=======================

[](#laravel-bcrypt-password)

A Laravel package for bcrypt password hashing functionality with WordPress password compatibility.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require ahmed-j-alsarem/laravel-bcrypt-password
```

Configuration
-------------

[](#configuration)

Publish the configuration file:

```
php artisan vendor:publish --provider="AhmedJAlsarem\LaravelBcryptPassword\BcryptPasswordServiceProvider"
```

Usage
-----

[](#usage)

```
use AhmedJAlsarem\LaravelBcryptPassword\PasswordHasher;

// Via dependency injection
public function __construct(PasswordHasher $hasher)
{
    $this->hasher = $hasher;
}

// Hash a password
$hash = $this->hasher->hash('password123');

// Verify a password (supports both Laravel and WordPress hashes)
$isValid = $this->hasher->verify('password123', $hash);

// WordPress Password Compatibility
// Example with WordPress password hash
$wp_hash = '$wp$2y$10$y6/UfA/WhvVLZK6RxBSJE./L6YpJN8ChGg15a0Pqry/bTGsDuMR1q';
$isValid = $this->hasher->verify('Na101918!', $wp_hash);

// Supports multiple WordPress hash formats:
// 1. WordPress bcrypt with $wp$ prefix
// 2. WordPress phpass with $P$ prefix
// 3. phpBB3 with $H$ prefix
// 4. Standard bcrypt with $2y$ prefix

// Check if password needs rehash
$needsRehash = $this->hasher->needsRehash($hash);
```

Configuration
-------------

[](#configuration-1)

You can configure the bcrypt cost and WordPress compatibility options in your `.env` file:

```
BCRYPT_COST=12
WP_ITERATION_COUNT_LOG2=8
WP_PORTABLE_PASSWORDS=true

```

Or in the configuration file `config/bcrypt-password.php`.

Testing
-------

[](#testing)

```
composer test
```

License
-------

[](#license)

The MIT License (MIT)

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance44

Moderate activity, may be stable

Popularity15

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity49

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

Every ~0 days

Total

11

Last Release

438d ago

Major Versions

v1.1.1 → v2.0.02025-04-23

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/147594920?v=4)[Ahmed](/maintainers/AHMED-J-ALSAREM)[@AHMED-J-ALSAREM](https://github.com/AHMED-J-ALSAREM)

---

Top Contributors

[![AHMED-J-ALSAREM](https://avatars.githubusercontent.com/u/147594920?v=4)](https://github.com/AHMED-J-ALSAREM "AHMED-J-ALSAREM (13 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/ahmed-j-alsarem-laravel-bcrypt-password/health.svg)

```
[![Health](https://phpackages.com/badges/ahmed-j-alsarem-laravel-bcrypt-password/health.svg)](https://phpackages.com/packages/ahmed-j-alsarem-laravel-bcrypt-password)
```

###  Alternatives

[directorytree/ldaprecord-laravel

LDAP Authentication &amp; Management for Laravel.

5752.3M18](/packages/directorytree-ldaprecord-laravel)[illuminate/auth

The Illuminate Auth package.

10528.2M1.2k](/packages/illuminate-auth)[althinect/filament-spatie-roles-permissions

3481.1M10](/packages/althinect-filament-spatie-roles-permissions)[hasinhayder/tyro

Tyro - The ultimate Authentication, Authorization, and Role &amp; Privilege Management solution for Laravel 12 &amp; 13

6804.7k6](/packages/hasinhayder-tyro)[masterix21/laravel-licensing

Laravel licensing package with polymorphic assignment to any model, activation keys, expirations/renewals, and seat control via LicenseUsage. Supports offline verification with public-key–signed tokens, a CLI to generate/rotate/revoke keys, and an extensible architecture via config and contracts.

1563.2k4](/packages/masterix21-laravel-licensing)

PHPackages © 2026

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