PHPackages                             langleyfoxall/php-rsa-signer - 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. langleyfoxall/php-rsa-signer

ActiveLibrary[Security](/categories/security)

langleyfoxall/php-rsa-signer
============================

🔒 Simplifies the process of signing API payloads with a specific private key

v1.0.0(6y ago)2871LGPL-3.0-onlyPHPPHP &gt;=7.1

Since Jul 8Pushed 6y agoCompare

[ Source](https://github.com/langleyfoxall/php-rsa-signer)[ Packagist](https://packagist.org/packages/langleyfoxall/php-rsa-signer)[ RSS](/packages/langleyfoxall-php-rsa-signer/feed)WikiDiscussions master Synced 2mo ago

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

🔒 PHP RSA Signer
================

[](#-php-rsa-signer)

PHP RSA Signer was designed to simplify the process of signing API payloads with a specific private key.

Installation
------------

[](#installation)

To install PHP RSA Signer, just run the following Composer command from the root of your project.

```
composer require langleyfoxall/php-rsa-signer
```

Usage
-----

[](#usage)

First, define the message you wish to sign. It can be a string, array, or object. If an array or object is used, it will be JSON encoded before being signed.

```
$message = 'This is my signable message';

$message = [
    'foo' => 'bar',
    'baz' => 'boff',
];

$message = \stdClass();
$message->foo = 'bar';
$message->baz = 'boff';
```

Next, instantiate the `Signer` class with the content of your private key. Its type will be automatically determined in most cases. If not, you can specify the type as a second parameter.

```
// Instantiate with private key

$signer = Signer($privateKey);

// Instantiate with private key, and specific key type

$signer = Signer($xmlPrivateKey, RSA::PRIVATE_FORMAT_XML);
```

You can then call the `getSignature` or `getBase64Signature` method to sign the message, and return the signature.

```
// Get binary signature

$base64Signature = $signer->getSignature($json);

// Get base 64 Signature

$base64Signature = $signer->getBase64Signature($json);

// Get base 64 signature, using custom options for JSON encoding

$base64Signature = $signer
            ->setJsonEncodingOptions(JSON_UNESCAPED_SLASHES)
            ->getBase64Signature($json);
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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

2497d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c580cdf7c14898fff179cdfc1085892091d5d2f49d917873a12365af9ac77c93?d=identicon)[Jord-JD](/maintainers/Jord-JD)

---

Top Contributors

[![dextermb](https://avatars.githubusercontent.com/u/6137789?v=4)](https://github.com/dextermb "dextermb (2 commits)")[![Jord-JD](https://avatars.githubusercontent.com/u/650645?v=4)](https://github.com/Jord-JD "Jord-JD (2 commits)")

---

Tags

php-libraryrsarsa-signature

### Embed Badge

![Health badge](/badges/langleyfoxall-php-rsa-signer/health.svg)

```
[![Health](https://phpackages.com/badges/langleyfoxall-php-rsa-signer/health.svg)](https://phpackages.com/packages/langleyfoxall-php-rsa-signer)
```

###  Alternatives

[singpolyma/openpgp-php

Pure-PHP implementation of the OpenPGP Message Format (RFC 4880)

184795.6k10](/packages/singpolyma-openpgp-php)[payu/apple-pay

ApplePay Token Decoder

51983.2k](/packages/payu-apple-pay)[mlocati/ocsp

Library to query HTTPS Certificates revocation status using the Online Certificate Status Protocol (OCSP)

40754.7k2](/packages/mlocati-ocsp)[spatie/ssl-certificate-chain-resolver

SSL certificate chain resolver

3069.6k](/packages/spatie-ssl-certificate-chain-resolver)[camcima/dukpt-php

DUKPT implementation in PHP

25153.1k](/packages/camcima-dukpt-php)

PHPackages © 2026

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