PHPackages                             yiche/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. yiche/sign

ActiveLibrary

yiche/sign
==========

v0.1(7y ago)041PHP

Since Dec 5Pushed 6y ago3 watchersCompare

[ Source](https://github.com/saasyc-inc/sign)[ Packagist](https://packagist.org/packages/yiche/sign)[ RSS](/packages/yiche-sign/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

微服务签名算法
=======

[](#微服务签名算法)

package源安装
----------

[](#package源安装)

> `composer require yiche/sign`

私有源安装
-----

[](#私有源安装)

```
```

普通使用
----

[](#普通使用)

```
include __DIR__ . '/vendor/autoload.php';

$appKey       = '0123456';
$appSecretKey = '4564877211';
$expireTime   = 0;
$signClient   = new \yiche\Sign\Sign($appKey, $appSecretKey, $expireTime);

$data    = [
    'client_time' => time(),
    'name'        => 'Sentiger',
    'age'         => '18'
];

// 生成签名
$signStr = $signClient->createSign($data);

// 检测签名

$checkData         = $data;
$checkData['sign'] = $signStr;
try {
    $signClient->checkSign($checkData);
} catch (\Exception $e) {
    echo $e->getMessage();
}

print_r($signStr);
```

在laravel框架中通过依赖注入使用
-------------------

[](#在laravel框架中通过依赖注入使用)

- 配置

> config/services.php

```
...

'sassyc' => [
        'app_key'        => '123456',
        'app_secret_key' => '11114fdsfadas',
        'expire_time'    => 0,  //服务端验证签名过期时间0表示不过期
    ]
...
```

- 通过依赖注入使用

```
Route::get('sign', function (\yiche\Sign\Sign $signClient) {
    $data = [
        'client_time' => 1543995526,
        'name'        => '张三',
        'age'         => '12'
    ];
    // 生成签名
    $signStr = $signClient->createSign($data);

    // curl传
    $checkData = array_merge($data, [
        'sign' => $signStr
    ]);

    // 检测签名
    $signClient->checkSign($checkData);

    return $signStr;

});
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

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

2713d ago

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/yiche-sign/health.svg)

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

PHPackages © 2026

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