PHPackages                             wanadri/x-sign-payload - 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. wanadri/x-sign-payload

ActiveLibrary[Security](/categories/security)

wanadri/x-sign-payload
======================

Secure HMAC-SHA256/SHA512 payload signing and verification for PHP frameworks

v1.0.0(2mo ago)05MITPHPPHP ^8.1CI passing

Since Apr 30Pushed 2mo agoCompare

[ Source](https://github.com/wanadri/x-sign-payload)[ Packagist](https://packagist.org/packages/wanadri/x-sign-payload)[ RSS](/packages/wanadri-x-sign-payload/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

x-sign-payload
==============

[](#x-sign-payload)

> Secure HMAC-SHA256/SHA512 payload signing and verification for PHP and JavaScript

[![PHP Tests](https://github.com/wanadri/x-sign-payload/actions/workflows/test.yml/badge.svg)](https://github.com/wanadri/x-sign-payload/actions)[![npm version](https://camo.githubusercontent.com/1b0f19ee3ba64e8a286153060700bee4fbc0f4114728e62e480e580656723000/68747470733a2f2f62616467652e667572792e696f2f6a732f782d7369676e2d7061796c6f61642e737667)](https://www.npmjs.com/package/x-sign-payload)[![Packagist Version](https://camo.githubusercontent.com/c1fee8ae78a1ce7dc9e693a98ab66ff0e8c8bf1e4b68ce8d1865e4f559ae4b8e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f77616e616472692f782d7369676e2d7061796c6f6164)](https://packagist.org/packages/wanadri/x-sign-payload)

Features
--------

[](#features)

- 🔐 **HMAC-SHA256/SHA512** - Industry-standard cryptographic hashing
- ⏱️ **Replay Protection** - Configurable timestamp validation
- 🛠️ **Multi-Framework** - Laravel, CakePHP, CodeIgniter, Node.js, Browser
- ⚡ **Easy Integration** - Simple middleware and auto-signing
- 🌐 **Cross-Language** - Sign in JS, verify in PHP (and vice versa)

Quick Start
-----------

[](#quick-start)

### PHP (Laravel)

[](#php-laravel)

```
composer require wanadri/x-sign-payload
php artisan x-sign:install
```

```
// routes/api.php
Route::post('/webhook', [WebhookController::class, 'handle'])
    ->middleware('x-sign.verify');
```

### JavaScript (Node.js)

[](#javascript-nodejs)

```
npm install x-sign-payload
```

```
import { XSignClient } from "x-sign-payload";

const client = new XSignClient({
  secret: process.env.X_SIGN_SECRET,
});

const { headers } = client.sign({ user: "john@example.com" });
// headers = { 'X-Signature': 'sha256=...', 'X-Timestamp': '...' }
```

### JavaScript (Browser)

[](#javascript-browser)

```
import { XSignClient } from "x-sign-payload";

const client = new XSignClient({ secret: "your-secret" });

const headers = await client.signAsync({ action: "submit" });
fetch("/api/submit", {
  method: "POST",
  headers,
  body: JSON.stringify({ action: "submit" }),
});
```

Documentation
-------------

[](#documentation)

Full documentation is available at:

- [Installation](https://wanadri.github.io/x-sign-payload/get-started/installation)
- [Quick Setup](https://wanadri.github.io/x-sign-payload/get-started/quick-setup)
- [How to Use](https://wanadri.github.io/x-sign-payload/get-started/how-to-use)
- [Middleware Implementation](https://wanadri.github.io/x-sign-payload/get-started/middleware-implementation)

Supported Languages &amp; Frameworks
------------------------------------

[](#supported-languages--frameworks)

LanguageFrameworkStatusPHPLaravel 10+✅ AvailablePHPCakePHP 4+✅ AvailablePHPCodeIgniter 4✅ AvailableJavaScriptNode.js / Browser✅ AvailablePythonDjango / Flask🚧 Coming SoonRubyRuby on Rails🚧 Coming SoonMonorepo Structure
------------------

[](#monorepo-structure)

```
x-sign-payload/
├── packages/
│   ├── php/          # PHP package (wanadri/x-sign-payload)
│   └── js/           # JavaScript package (x-sign-payload)
├── docs/             # VitePress documentation
└── tests/
    └── cross-language/ # JS/PHP interoperability tests

```

Contributing
------------

[](#contributing)

We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md).

Support
-------

[](#support)

- ⭐ Star this repository
- 🐛 [Report issues](https://github.com/wanadri/x-sign-payload/issues)
- ☕ [Buy me a coffee](https://www.buymeacoffee.com/wanadri)

License
-------

[](#license)

MIT License - see [LICENSE](LICENSE) file.

---

Made with ❤️ by [Wan Adri](https://github.com/wanadri)

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance83

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

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

86d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2c83260f02ab2b03f3f8b0b4bb406ae6d79b70e72a90f9180197c3d4ed678c82?d=identicon)[wanadri](/maintainers/wanadri)

---

Top Contributors

[![wanadri](https://avatars.githubusercontent.com/u/13805716?v=4)](https://github.com/wanadri "wanadri (13 commits)")

---

Tags

laravelsecuritysignaturecakephpcodeigniterpayloadverificationhmac

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/wanadri-x-sign-payload/health.svg)

```
[![Health](https://phpackages.com/badges/wanadri-x-sign-payload/health.svg)](https://phpackages.com/packages/wanadri-x-sign-payload)
```

###  Alternatives

[akaunting/laravel-firewall

Web Application Firewall (WAF) package for Laravel

1.0k508.9k2](/packages/akaunting-laravel-firewall)[enlightn/laravel-security-checker

A Laravel package to scan your dependencies for known security vulnerabilities.

51177.7k](/packages/enlightn-laravel-security-checker)

PHPackages © 2026

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