PHPackages                             verdient/signature - 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. verdient/signature

ActiveLibrary[Security](/categories/security)

verdient/signature
==================

A simple library to work with Web Signature

0.1.0(5y ago)06004MITPHPPHP &gt;=7.0.0

Since Feb 11Pushed 5y ago1 watchersCompare

[ Source](https://github.com/Verdient/signature)[ Packagist](https://packagist.org/packages/verdient/signature)[ Docs](https://github.com/Verdient/signature)[ RSS](/packages/verdient-signature/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (1)Versions (4)Used By (4)

Signature
=========

[](#signature)

签名

安装
--

[](#安装)

```
composer require verdient/signature
```

创建签名实例
------

[](#创建签名实例)

```
use Verdient\signature\Signature;

/**
 * 签名秘钥
 */
$key = '****';

/**
 * 编码器
 * 默认为signature\encoder\HmacEncoder
 * 系统内置了HmacEncoder和Base64Encoder，也可以通过实现EncoderInterface来实现自己的编码器
 * 可以通过数组的方式来配置，格式为
 * [
 *     'class' => {className}
 *     ${property1} => ${property1},
 *     ${property2} => ${property2},
 *     ...
 * ]
 */
$encoder = 'Verdient\signature\encoder\HmacEncoder';

$sign = new Signature([
	'key' => $key,
	'encoder ' => $encoder
]);
```

对数据进行签名
-------

[](#对数据进行签名)

```
/**
 * 待签名的数据
 * 可以为字符串和数组
 */
$data = ['key1' => 1, 'key2' => 2, 'key3' => 3];

$signature = $sign->sign($data);
```

验证签名
----

[](#验证签名)

```
$sign->validate($data, $signature);
```

###  Health Score

25

—

LowBetter than 36% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity44

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

Every ~220 days

Total

3

Last Release

1885d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/606eaa4bc61b11fa19f25526a3084758b7086ceb8b11cdbcafd5df11871f2437?d=identicon)[Verdient。](/maintainers/Verdient%E3%80%82)

---

Top Contributors

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

---

Tags

websignaturelibraryverify

### Embed Badge

![Health badge](/badges/verdient-signature/health.svg)

```
[![Health](https://phpackages.com/badges/verdient-signature/health.svg)](https://phpackages.com/packages/verdient-signature)
```

###  Alternatives

[phpseclib/phpseclib

PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.

5.6k455.2M1.5k](/packages/phpseclib-phpseclib)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)[robrichards/xmlseclibs

A PHP library for XML Security

41582.2M138](/packages/robrichards-xmlseclibs)[ionux/phactor

Phactor is a high-performance PHP implementation of the elliptic curve math functions required to generate &amp; verify private/public (asymmetric) EC keypairs and ECDSA signatures based on secp256k1 curve parameters. This library also includes a class to generate Service Identification Numbers (SINs) based on the published Identity Protocol v1 spec.

5283.3k30](/packages/ionux-phactor)[ass/xmlsecurity

The XmlSecurity library is written in PHP for working with XML Encryption and Signatures

955.6M33](/packages/ass-xmlsecurity)[greenter/xmldsig

Libreria para firmar XML según normativa de SUNAT en Facturación Electrónica

39833.8k10](/packages/greenter-xmldsig)

PHPackages © 2026

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