承接 jazzman/wp-password-argon 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jazzman/wp-password-argon

Composer 安装命令:

composer require jazzman/wp-password-argon

包简介

Securely store WordPress user passwords in database with Argon2i hashing and SHA-512 HMAC using PHP's native functions.

README 文档

README

Enhance WordPress security by replacing outdated MD5 password hashing with modern Argon2i encryption

PHP Version WordPress License Composer

The Problem

WordPress still uses MD5-based password hashing (via PHPass), an algorithm from 2001 that's considered weak by modern security standards. While adequate for its time, MD5 is vulnerable to:

  • ⚠️ Brute force attacks (fast to compute)
  • ⚠️ Rainbow table attacks
  • ⚠️ GPU-accelerated cracking

The Solution

This must-use plugin replaces WordPress's password hashing system with:

  • Argon2i - Winner of Password Hashing Competition (2015)
  • SHA-512 HMAC - Additional layer of protection
  • Automatic migration - Rehashes old passwords on login
  • Zero configuration - Drop in and forget
  • Backward compatible - Works with existing WordPress user system

Key Features

🔐 Modern Cryptography

  • Argon2i algorithm - Memory-hard hashing designed to resist GPU attacks
  • SHA-512 HMAC - Adds salt-based message authentication
  • Native PHP functions - No external dependencies, uses PHP's password_hash()

🔄 Seamless Migration

  • Automatically detects old MD5 hashes
  • Rehashes passwords when users login
  • No manual migration needed
  • Maintains backward compatibility during transition

🎯 Drop-in Replacement

  • Overrides core WordPress functions: wp_hash_password(), wp_check_password(), wp_set_password()
  • Works as must-use plugin (loads before regular plugins)
  • Supports Application Passwords (WordPress 5.6+)
  • No configuration required

⚡ Performance

  • Minimal overhead compared to MD5
  • Argon2i parameters can be customized via filter
  • Efficient rehashing on authentication

Installation

Via Composer (Recommended)

composer require jazzman/wp-password-argon

The package installs automatically to wp-content/mu-plugins/wp-password-argon/ via Composer Installers.

Manual Installation

  1. Download the latest release
  2. Upload to wp-content/mu-plugins/wp-password-argon/
  3. That's it! No activation needed (must-use plugins auto-load)

How It Works

Password Hashing Flow

User enters password
    ↓
SHA-512 HMAC with WordPress salt
    ↓
Argon2i hashing with memory cost
    ↓
Stored in database

Authentication Flow

User login attempt
    ↓
Check if password uses Argon2i
    ↓
├─ Yes → Verify with password_verify()
└─ No (old MD5) → Verify with PHPass
                 → Rehash with Argon2i
                 → Update database

Configuration

The plugin works out-of-the-box with secure defaults. To customize Argon2i parameters:

add_filter('wp_hash_password_options', function() {
    return [
        'memory_cost' => PASSWORD_ARGON2_DEFAULT_MEMORY_COST,
        'time_cost'   => PASSWORD_ARGON2_DEFAULT_TIME_COST,
        'threads'     => PASSWORD_ARGON2_DEFAULT_THREADS,
    ];
});

Security Benefits

Aspect MD5 (WordPress default) Argon2i (This plugin)
Algorithm Age 1992 (33 years old) 2015 (10 years old, current best practice)
Cracking Speed Very fast Slow (memory-hard)
GPU Resistance ❌ Weak ✅ Strong
Rainbow Tables ❌ Vulnerable ✅ Resistant
OWASP Recommended ❌ No ✅ Yes

Requirements

  • PHP: 7.4+ or 8.1+ (PHP 8+ recommended)
  • WordPress: 5.2+
  • PHP Extensions:
    • sodium (usually bundled with PHP 7.2+)
    • No additional extensions needed

Under The Hood

Quality Tooling

This package maintains high code quality standards:

# Static Analysis
composer phpstan        # PHPStan max level
composer psalm          # Psalm strict mode

# Code Style
composer cs-check       # Check PSR-12 compliance
composer cs-fix         # Auto-fix code style

# Baseline Management
composer update-baseline # Update analysis baselines

Tech Stack

  • Static Analysis: PHPStan (max level), Psalm
  • Code Style: PHP CS Fixer with custom rules (jazzman/php-cs-fixer-rules)
  • Security Auditing: Roave Security Advisories
  • Type Safety: WordPress stubs for IDE support

Package Configuration

  • Type: wordpress-muplugin (auto-installs to mu-plugins)
  • License: MIT
  • Optimizations: APCu autoloader, optimized autoloader, authoritative classmap

FAQ

Q: Will this break my existing WordPress site?
A: No. The plugin is backward compatible. Old passwords work during the transition period and are automatically upgraded on user login.

Q: What happens if I remove the plugin?
A: Users with Argon2i passwords won't be able to login. Recommendation: Keep the plugin installed once deployed.

Q: Does this work with multisite?
A: Yes. Install as network-wide must-use plugin.

Q: Performance impact?
A: Minimal. Argon2i is slightly slower than MD5, but this is intentional (security vs. speed trade-off). Typical impact: <100ms per authentication.

Q: Can I migrate back to MD5?
A: Technically possible but strongly discouraged for security reasons. Once passwords are hashed with Argon2i, they should stay that way.

Why This Matters

Real-world impact:

  • WordPress powers 43% of the web
  • Over 455 million websites use WordPress
  • Default MD5 hashing leaves millions of sites vulnerable
  • This plugin provides enterprise-grade security with zero effort

Recommended by:

  • ✅ OWASP (Open Web Application Security Project)
  • ✅ NIST (National Institute of Standards and Technology)
  • ✅ PHP Security Best Practices

Related Packages

Part of the jazzman WordPress ecosystem:

License

MIT License - see LICENSE file for details.

Author

Vasyl Sokolyk

Support & Contributing

Found a bug? Have a feature request? Open an issue on GitHub.

Security vulnerabilities: Please email vsokolyk@gmail.com directly rather than opening a public issue.

⭐ If this plugin improved your WordPress security, please star the repo!

jazzman/wp-password-argon 适用场景与选型建议

jazzman/wp-password-argon 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 598 次下载、GitHub Stars 达 0, 最近一次更新时间为 2022 年 10 月 30 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 jazzman/wp-password-argon 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 jazzman/wp-password-argon 我们能提供哪些服务?
定制开发 / 二次开发

基于 jazzman/wp-password-argon 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 598
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 38
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-10-30