PHPackages                             liamdennehy/http-signatures-php - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. liamdennehy/http-signatures-php

AbandonedArchivedLibrary[HTTP &amp; Networking](/categories/http)

liamdennehy/http-signatures-php
===============================

Sign and verify PSR-7 HTTP messages with HMAC and RSA keys

v11.0.0(5y ago)9129.1k↓30%8[5 PRs](https://github.com/liamdennehy/http-signatures-php/pulls)MITPHPPHP &gt;=5.6

Since Jul 2Pushed 2y ago2 watchersCompare

[ Source](https://github.com/liamdennehy/http-signatures-php)[ Packagist](https://packagist.org/packages/liamdennehy/http-signatures-php)[ RSS](/packages/liamdennehy-http-signatures-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (12)Versions (45)Used By (0)

Signing HTTP Messages PSR-7 Library
===================================

[](#signing-http-messages-psr-7-library)

[![Build Status](https://camo.githubusercontent.com/f0c1c533fb06cd483e35e4978331a39542f1f83314f2354523920b5209a7086c/68747470733a2f2f7472617669732d63692e6f72672f6c69616d64656e6e6568792f687474702d7369676e6174757265732d7068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/liamdennehy/http-signatures-php)[![Documentation Status](https://camo.githubusercontent.com/d79ddb9a34442a7418dd310bfae607628825b675f5525dc12342a9cfde061c8b/68747470733a2f2f72656164746865646f63732e6f72672f70726f6a656374732f687474702d7369676e6174757265732d7068702f62616467652f3f76657273696f6e3d6c6174657374)](https://http-signatures-php.readthedocs.io/en/latest/?badge=latest)

PHP implementation of [Signing HTTP Messages](http://tools.ietf.org/html/draft-cavage-http-signatures-10) draft specification; allowing cryptographic signing and verifying of [PSR-7 messages](http://www.php-fig.org/psr/psr-7/).

Features
--------

[](#features)

- Sign HTTP Messages according to [Signing HTTP Message draft IETF RFC version 10](http://tools.ietf.org/html/draft-cavage-http-signatures-10)
- Sign &amp; verify messages using HMACs
- Sign &amp; verify messages with Asymmetric Keys:
    - RSA, DSA, EC
- Add a `Digest` header, or automatically add the header while signing in a single operation
- Verify a `Digest` header while verifying the signature

Complete documentation for this library can be found at [Read The Docs](https://http-signatures-php.readthedocs.io/en/latest/)

**WARNING:** Version 11 of this library incorporates [phpseclib](http://phpseclib.sourceforge.net/)'s ongoing work on their [version 3.0 implementation](https://github.com/phpseclib/phpseclib/tree/3.0). If there are any problems please log an issue, but as the library has not been stabilised or completely reviewed you are advised to proceed with caution, or remain at v10 of this library until phpseclib 3.0 is complete and the MAJOR version of this library is bumped.

Simple Usage
------------

[](#simple-usage)

Add [liamdennehy/http-signatures-php](https://packagist.org/packages/liamdennehy/http-signatures-php) to your [`composer.json`](https://getcomposer.org/).

- A message is assumed to be a PSR-7 compatible Request or Response.
- A `Context` object is used to configure the signature parameters, and prepare the verifier functionality.
- The `signWithDigest` function witll add a `Digest` header and digitally sign the message in a new `Signature` header.

Signing a PSR-7 request `$message` before sending:

```
  use HttpSignatures\Context;

  $context = new HttpSignatures\Context([
    'keys' => ['mykey' => file_get_contents('/path/to/privatekeyfile')],
    'algorithm' => 'rsa-sha256',
    'headers' => ['(request-target)', 'Date'],
  ]);

  $context->signer()->signWithDigest($message);
```

Complete documentation for this library for other ose cases can be found at [Read The Docs](https://http-signatures-php.readthedocs.io/en/latest/)

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

[](#contributing)

Pull Requests are welcome, as are [issue reports](https://github.com/liamdennehy/http-signatures-php/issues) if you encounter any problems.

**Note**: Due to composer dependencies for the reference implementation `composer install` prior to local development is only posible on PHP 7.1, or by manually removing the incompatible dependencies using the command (wrapped for readability):

```
  composer remove --dev \
  nyholm/psr7 nyholm/psr7-server riswallsmith/buzz \
  endframework/zend-httphandlerrunner
```

License
-------

[](#license)

HTTP Signatures PHP library is licensed under [The MIT License (MIT)](https://opensource.org/licenses/MIT).

Documentation of the library is licensed under [Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)](https://creativecommons.org/licenses/by-sa/4.0/)

Details are in the [LICENSE file](./LICENSE.md)

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 72.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 ~40 days

Recently: every ~78 days

Total

38

Last Release

2128d ago

Major Versions

4.0.1 → 5.0.02019-07-30

4.1.0 → 5.1.02019-07-30

5.1.0 → 6.0.02019-07-31

6.6.0 → 10.0.02019-08-18

10.0.1 → v11.0.0-alpha12019-09-05

PHP version history (3 changes)2.0.4PHP &gt;=5.3.3

3.0PHP &gt;=5.5

4.0.1PHP &gt;=5.6

### Community

Maintainers

![](https://www.gravatar.com/avatar/d35001b93316a845173773ab18cae4a9ae2cd751b5a1480270e5d4807d103941?d=identicon)[liamdennehy](/maintainers/liamdennehy)

---

Top Contributors

[![liamdennehy](https://avatars.githubusercontent.com/u/4996358?v=4)](https://github.com/liamdennehy "liamdennehy (282 commits)")[![pda](https://avatars.githubusercontent.com/u/15759?v=4)](https://github.com/pda "pda (54 commits)")[![navitronic](https://avatars.githubusercontent.com/u/180519?v=4)](https://github.com/navitronic "navitronic (24 commits)")[![mtibben](https://avatars.githubusercontent.com/u/980499?v=4)](https://github.com/mtibben "mtibben (16 commits)")[![vinkla](https://avatars.githubusercontent.com/u/499192?v=4)](https://github.com/vinkla "vinkla (6 commits)")[![rubensayshi](https://avatars.githubusercontent.com/u/649160?v=4)](https://github.com/rubensayshi "rubensayshi (5 commits)")[![harto](https://avatars.githubusercontent.com/u/103448?v=4)](https://github.com/harto "harto (1 commits)")[![hannesvdvreken](https://avatars.githubusercontent.com/u/1410358?v=4)](https://github.com/hannesvdvreken "hannesvdvreken (1 commits)")[![vektah](https://avatars.githubusercontent.com/u/2247982?v=4)](https://github.com/vektah "vektah (1 commits)")[![feenx](https://avatars.githubusercontent.com/u/9256168?v=4)](https://github.com/feenx "feenx (1 commits)")

---

Tags

httphttpssignaturesigningrsahmacdigital-signaturesignedelectronic signature

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/liamdennehy-http-signatures-php/health.svg)

```
[![Health](https://phpackages.com/badges/liamdennehy-http-signatures-php/health.svg)](https://phpackages.com/packages/liamdennehy-http-signatures-php)
```

###  Alternatives

[99designs/http-signatures

Sign and verify HTTP messages

47769.4k6](/packages/99designs-http-signatures)[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

7.9k1.0B3.2k](/packages/guzzlehttp-psr7)[league/uri-interfaces

Common tools for parsing and resolving RFC3987/RFC3986 URI

536204.9M23](/packages/league-uri-interfaces)[99designs/http-signatures-guzzlehttp

Sign and verify HTTP messages with Guzzle 6

13204.5k5](/packages/99designs-http-signatures-guzzlehttp)[league/uri

URI manipulation library

1.1k206.4M277](/packages/league-uri)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78026.4M414](/packages/react-http)

PHPackages © 2026

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