PHPackages                             pebm/simple-api-sign - 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. [API Development](/categories/api)
4. /
5. pebm/simple-api-sign

ActiveLibrary[API Development](/categories/api)

pebm/simple-api-sign
====================

Simple API sign is a simple implementation of API signature

00PHP

Since Feb 20Pushed 4y ago1 watchersCompare

[ Source](https://github.com/pebm/simple-api-sign)[ Packagist](https://packagist.org/packages/pebm/simple-api-sign)[ RSS](/packages/pebm-simple-api-sign/feed)WikiDiscussions main Synced 6d ago

READMEChangelogDependenciesVersions (1)Used By (0)

simple-api-sign
===============

[](#simple-api-sign)

[![npm version](https://camo.githubusercontent.com/d3ba3824965a0dfea85d875e562722adfd1e76f18d48a6083a6400d45bd9bcd7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d312e302e302d627269676874677265656e)](https://camo.githubusercontent.com/d3ba3824965a0dfea85d875e562722adfd1e76f18d48a6083a6400d45bd9bcd7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d312e302e302d627269676874677265656e)

Simple API sign is a simple implementation of API signature. It now includes JS and PHP versions with corresponding create and check methods.General projects can be used out of the box, but I do not guarantee the security of this method and the repair of future events.this module is very simple. You might as well look at the source code.

This module is mainly for my own use. When the data from the front-end (usually JavaScript projects) is sent to the back-end (PHP and python), the back-end will verify the data. The creation of token is omitted here because there are many open and general standards for the construction of token.

Finally, the timestamp and random string added to the data may be used for other purposes. That's it for the time being.

Others
------

[](#others)

javascript version See [NPM](https://www.npmjs.com/package/simple-api-sign).

Install
-------

[](#install)

```
composer require pebm/simple-api-sign

```

Usage
-----

[](#usage)

```
require "vendor/autoload.php";

use SimpleApiSign\SimpleApiSign as ApiSign;

$data = [
    'source'    => 'products',
    'pk'        => 1003443,
    'ext'       => [
        'sales', 'pv', 'uv'
    ],
    'x' => [
        'x'     => 23,
        'few'   => [
            'fs'    => [0,2,3]
        ]
    ]
];

$apiSign = new ApiSign;

$token = 'xx';

$signData = $apiSign->create($data, $token);

/** signData like this
 Array
(
    [source] => products
    [pk] => 1003443
    [ext] => Array
        (
            [0] => sales
            [1] => pv
            [2] => uv
        )
    [x] => Array
        (
            [x] => 23
            [few] => Array
                (
                    [fs] => Array
                        (
                            [0] => 0
                            [1] => 2
                            [2] => 3
                        )
                )
        )
    [timestamp] => 1645365617000
    [random] => 208086
    [sign] => 72BDDFD9993072EE4EBE63C451F138E3
)
 */

$isValid = $apiSign->check($a, $token);

// your code ...
```

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity27

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/0d0ed3fdca0af06f48293dde8b59c56c2e7009708dadb18891104ee121df1fd0?d=identicon)[pebm](/maintainers/pebm)

---

Top Contributors

[![pebm](https://avatars.githubusercontent.com/u/3379291?v=4)](https://github.com/pebm "pebm (2 commits)")

### Embed Badge

![Health badge](/badges/pebm-simple-api-sign/health.svg)

```
[![Health](https://phpackages.com/badges/pebm-simple-api-sign/health.svg)](https://phpackages.com/packages/pebm-simple-api-sign)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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