PHPackages                             janjanenjoy/crypt - 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. janjanenjoy/crypt

ActiveLibrary[Security](/categories/security)

janjanenjoy/crypt
=================

明文传输:数据签名/验签、密文传输:数据加/解密

1.5(6y ago)09MITPHPPHP &gt;=7.1.3CI failing

Since Mar 21Pushed 6y ago1 watchersCompare

[ Source](https://github.com/janjanEnjoy/crypt)[ Packagist](https://packagist.org/packages/janjanenjoy/crypt)[ RSS](/packages/janjanenjoy-crypt/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (3)Dependencies (1)Versions (10)Used By (0)

crypt for Laravel 5.\* or Lumen
===============================

[](#crypt-for-laravel-5-or-lumen)

Installing
----------

[](#installing)

```
composer require janjanenjoy/crypt
```

### Laravel

[](#laravel)

register the provider to your project

```
//config/app.php

'providers' => [
        //...
        JanjanEnjoy\Crypt\CryptServiceProvider::class,    //This is default in laravel 5.5
    ],

/**if you want to use Facade mode ,you can add your own alias configuration like below.**/
'aliases' => [
        //...
        'MyCrypt' => \JanjanEnjoy\Crypt\CryptService::class,
]
```

and publish the config file to your project or copy the file from vendor by manual operation.

```
php artisan vendor:publish --provider=JanjanEnjoy\\Crypt\\CryptServiceProvider
```

### lumen

[](#lumen)

register the provider to your project

```
//bootstrap/app.php

$app->register( JanjanEnjoy\Crypt\CryptServiceProvider::class);
```

copy the config file from vendor to your root config direction by manual operation

Configuration
-------------

[](#configuration)

```
    /**
     * 本项目的app_secret
     */
    'app_secret' =>env('XTHK_APP_SECRET','12345678912345678912345678912312'),

    /**
     * 加密规则,支持AES-128-CBC，AES-256-CBC
     */
    'cipher' => env('XTHK_CIPHER','AES-256-CBC'),
```

Usage
-----

[](#usage)

```
$data = ['test'=>123];
$sign = MingCrypt::sign($data);   //签名
print_r($sign);
$check = MingCrypt::signCheck($data,$sign);   //验签
print_r($check);
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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 ~0 days

Total

9

Last Release

2246d ago

PHP version history (2 changes)1.1PHP ^7.3

1.4.1PHP &gt;=7.1.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/31478775?v=4)[wangjunjie](/maintainers/janjanEnjoy)[@janjanEnjoy](https://github.com/janjanEnjoy)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/janjanenjoy-crypt/health.svg)

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

###  Alternatives

[defuse/php-encryption

Secure PHP Encryption Library

3.9k162.4M214](/packages/defuse-php-encryption)[roave/security-advisories

Prevents installation of composer packages with known security vulnerabilities: no API, simply require it

2.9k97.3M6.4k](/packages/roave-security-advisories)[mews/purifier

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

2.0k16.7M113](/packages/mews-purifier)[robrichards/xmlseclibs

A PHP library for XML Security

41278.1M118](/packages/robrichards-xmlseclibs)[bjeavons/zxcvbn-php

Realistic password strength estimation PHP library based on Zxcvbn JS

86917.5M63](/packages/bjeavons-zxcvbn-php)[illuminate/encryption

The Illuminate Encryption package.

9229.7M280](/packages/illuminate-encryption)

PHPackages © 2026

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