PHPackages                             code-lives/decrypt - 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. code-lives/decrypt

ActiveLibrary[Security](/categories/security)

code-lives/decrypt
==================

this is decrypt

1.0(5y ago)0600MITPHP

Since Apr 8Pushed 4y ago1 watchersCompare

[ Source](https://github.com/code-lives/decrypt)[ Packagist](https://packagist.org/packages/code-lives/decrypt)[ RSS](/packages/code-lives-decrypt/feed)WikiDiscussions main Synced today

READMEChangelog (1)DependenciesVersions (2)Used By (0)

decrypt
=======

[](#decrypt)

用于前端和后台定义接口加密规则 进行解密

举例
==

[](#举例)

```
1.前端和后端定义 一个公用的加密参数 SECRET_KEY='123'

2.前端 请求接口header 传参

    sign         md5(SECRET_KEY+timestamp)

    timestamp    时间戳

3.后端接收 timestamp 拿着后端定义好的 SECRET_KEY 进行加密 md5(SECRET_KEY+timestamp)

4.加密后进行 和前端加密的sign 进行对比。
```

这是加密
----

[](#这是加密)

```
$apidecode = new \api\decode\apidecode($secret_key);

$sign = $apidecode->encode();

$sign=array('sign' => , 'time' => );
```

这是解密
----

[](#这是解密)

```
$apidecode = new \api\decode\apidecode($secret_key);

$status = $apidecode->decode($sign, $timestamp);

if(!$status){

    exit('非法操作');

}
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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

1913d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/79346591?v=4)[LiJie](/maintainers/code-lives)[@code-lives](https://github.com/code-lives)

---

Top Contributors

[![code-lives](https://avatars.githubusercontent.com/u/79346591?v=4)](https://github.com/code-lives "code-lives (5 commits)")

### Embed Badge

![Health badge](/badges/code-lives-decrypt/health.svg)

```
[![Health](https://phpackages.com/badges/code-lives-decrypt/health.svg)](https://phpackages.com/packages/code-lives-decrypt)
```

###  Alternatives

[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k18.7M143](/packages/mews-purifier)[paragonie/ecc

PHP Elliptic Curve Cryptography library

24820.0k38](/packages/paragonie-ecc)

PHPackages © 2026

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