PHPackages                             wuwx/laravel-hashing-md5 - 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. wuwx/laravel-hashing-md5

ActiveLibrary[Security](/categories/security)

wuwx/laravel-hashing-md5
========================

v4.3.0(1mo ago)815.6k↓32.8%8[1 PRs](https://github.com/wuwx/laravel-hashing-md5/pulls)MITPHPPHP ^7.3|^8.0CI failing

Since May 2Pushed 3mo ago2 watchersCompare

[ Source](https://github.com/wuwx/laravel-hashing-md5)[ Packagist](https://packagist.org/packages/wuwx/laravel-hashing-md5)[ RSS](/packages/wuwx-laravel-hashing-md5/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (6)Versions (10)Used By (0)

Laravel Hashing MD5
===================

[](#laravel-hashing-md5)

[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE)

为 Laravel 框架添加 MD5 哈希驱动支持。

> **注意**: MD5 是一种较弱的哈希算法，不推荐用于新项目的密码存储。此扩展包主要用于需要兼容旧系统或特定场景的项目。

功能特性
----

[](#功能特性)

- 为 Laravel 哈希系统添加 MD5 驱动
- 完全兼容 Laravel 的 `Hash` Facade
- 支持 Laravel 5.6 到 12.0 版本
- 支持 PHP 7.3 到 8.x 版本
- 自动服务提供者注册

系统要求
----

[](#系统要求)

- PHP &gt;= 7.3
- Laravel &gt;= 5.6

安装
--

[](#安装)

通过 Composer 安装扩展包：

```
composer require wuwx/laravel-hashing-md5
```

Laravel 5.5+ 会自动注册服务提供者。

配置
--

[](#配置)

编辑 `config/hashing.php` 配置文件，将 `driver` 更改为 `md5`：

```
'driver' => 'md5',
```

或者在 `.env` 文件中设置：

```
HASH_DRIVER=md5
```

使用方法
----

[](#使用方法)

### 基本使用

[](#基本使用)

配置完成后，可以像使用 Laravel 默认哈希驱动一样使用 MD5：

```
use Illuminate\Support\Facades\Hash;

// 生成 MD5 哈希
$hashed = Hash::make('password');

// 验证密码
if (Hash::check('password', $hashed)) {
    // 密码匹配
}
```

### 指定驱动使用

[](#指定驱动使用)

也可以显式指定使用 MD5 驱动：

```
$hashed = Hash::driver('md5')->make('password');
$isValid = Hash::driver('md5')->check('password', $hashed);
```

测试
--

[](#测试)

运行测试套件：

```
composer test
```

或使用 PHPUnit：

```
vendor/bin/phpunit
```

安全提示
----

[](#安全提示)

MD5 算法存在以下安全问题：

- 容易受到彩虹表攻击
- 计算速度快，容易被暴力破解
- 存在哈希碰撞漏洞

**强烈建议**：

- 新项目使用 `bcrypt` 或 `argon2` 算法
- 仅在需要兼容旧系统时使用此扩展包
- 考虑逐步迁移到更安全的哈希算法

许可证
---

[](#许可证)

本项目基于 [MIT 许可证](LICENSE) 开源。

贡献
--

[](#贡献)

欢迎提交 Issue 和 Pull Request。

###  Health Score

55

—

FairBetter than 98% of packages

Maintenance84

Actively maintained with recent releases

Popularity33

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 96.1% 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 ~360 days

Recently: every ~503 days

Total

9

Last Release

57d ago

Major Versions

v1.6.2 → v2.0.02020-03-05

v2.0.0 → v3.0.02020-09-13

v3.0.0 → v4.0.02022-11-01

### Community

Maintainers

![](https://www.gravatar.com/avatar/9c1977bba4586c70a4bdb6faaee4823184904ff3bd3246e79069871465500611?d=identicon)[wuwx](/maintainers/wuwx)

---

Top Contributors

[![wuwx](https://avatars.githubusercontent.com/u/4401?v=4)](https://github.com/wuwx "wuwx (49 commits)")[![felabrecque](https://avatars.githubusercontent.com/u/165329484?v=4)](https://github.com/felabrecque "felabrecque (1 commits)")[![marky291](https://avatars.githubusercontent.com/u/5384515?v=4)](https://github.com/marky291 "marky291 (1 commits)")

---

Tags

laravelhashingMD5hasher

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/wuwx-laravel-hashing-md5/health.svg)

```
[![Health](https://phpackages.com/badges/wuwx-laravel-hashing-md5/health.svg)](https://phpackages.com/packages/wuwx-laravel-hashing-md5)
```

###  Alternatives

[mikemclin/laravel-wp-password

Laravel package that checks and creates WordPress password hashes

863.4M2](/packages/mikemclin-laravel-wp-password)[tzsk/otp

A secure, database-free One-Time Password (OTP) generator and verifier for PHP and Laravel.

241641.4k1](/packages/tzsk-otp)[ammardev/laravel-wp-hash-driver

Supports Wordpress passwords hashing and checking in Laravel's Hash facade.

169.3k](/packages/ammardev-laravel-wp-hash-driver)[laragear/poke

Keep your forms alive, avoid TokenMismatchException by gently poking your Laravel app

2211.5k](/packages/laragear-poke)[robclancy/laravel4-hashing

Package for when you can't use Bcrypt in Laravel 4.

301.8k1](/packages/robclancy-laravel4-hashing)

PHPackages © 2026

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