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)0270MITPHPPHP ^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 1mo ago

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 68% of packages

Maintenance48

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

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

385d ago

Major Versions

v1.1.1 → v2.0.02025-04-23

### Community

Maintainers

![](https://www.gravatar.com/avatar/b175299909bbef086c42886b5c2db79b342c8ba899aed2d735323a6669b71fa7?d=identicon)[AHMED-J-ALSAREM](/maintainers/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

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)[olssonm/l5-very-basic-auth

Laravel stateless HTTP basic auth without the need for a database

1662.5M1](/packages/olssonm-l5-very-basic-auth)[stechstudio/laravel-jwt

Helper package that makes it easy to generate, consume, and protect routes with JWT tokens in Laravel

126117.6k](/packages/stechstudio-laravel-jwt)[scaler-tech/laravel-saml2

SAML2 Service Provider integration for Laravel applications, based on OneLogin toolkit

2737.5k](/packages/scaler-tech-laravel-saml2)[truckersmp/steam-socialite

Laravel Socialite provider for Steam OpenID.

1516.7k](/packages/truckersmp-steam-socialite)

PHPackages © 2026

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