PHPackages                             luler/phpcrypt - 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. luler/phpcrypt

ActiveLibrary[Security](/categories/security)

luler/phpcrypt
==============

这是一个PHP数据加密解密包，可以设置密码、过期时间，在一些需要对数据进行加密解密传输的应用中非常有用

0.0.1(4y ago)1253MITPHPPHP &gt;=7.0CI failing

Since Jul 16Pushed 4y agoCompare

[ Source](https://github.com/luler/phpcrypt)[ Packagist](https://packagist.org/packages/luler/phpcrypt)[ RSS](/packages/luler-phpcrypt/feed)WikiDiscussions master Synced yesterday

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

phpcrypt
========

[](#phpcrypt)

这是一个PHP数据加密解密包，可以设置密码、过期时间，在一些需要对数据进行加密解密传输的应用中非常有用

安装
==

[](#安装)

```
composer require luler/phpcrypt

```

使用例子
====

[](#使用例子)

```
$cleartext = "需要加密的数据";
$cipher = \Php\Crypt\Crypt::encrypt($cleartext, "123456");
echo "\n";
echo '加密后密文：' . $cipher . "\n";
echo '解密后明文：' . \Php\Crypt\Crypt::decrypt($cipher, "123456") . "\n";
//设置秘钥超时失效，只需把expires参数设置有效时间，单位是秒,比如有效期为一分钟，则设置expires为60
$cipher = \Php\Crypt\Crypt::encrypt($cleartext, "123456", 60);
echo '加密后密文：' . $cipher . "\n";
echo '解密后明文：' . \Php\Crypt\Crypt::decrypt($cipher, "123456") . "\n";

```

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity36

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1810d ago

### Community

Maintainers

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

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/luler-phpcrypt/health.svg)

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

###  Alternatives

[mews/purifier

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

2.0k18.0M138](/packages/mews-purifier)[paragonie/ecc

PHP Elliptic Curve Cryptography library

24772.0k35](/packages/paragonie-ecc)

PHPackages © 2026

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