PHPackages                             wjl/encrypt - 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. wjl/encrypt

ActiveLibrary[Security](/categories/security)

wjl/encrypt
===========

v0.3(2y ago)14MITPHPPHP &gt;=7.0

Since Apr 8Pushed 2y ago1 watchersCompare

[ Source](https://github.com/wjl694403901/encrypt)[ Packagist](https://packagist.org/packages/wjl/encrypt)[ RSS](/packages/wjl-encrypt/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

encrypt
=======

[](#encrypt)

这是一个php使用的aes加密/解密类

Installation
------------

[](#installation)

#### 使用 Composer 安装

[](#使用-composer-安装)

- 执行 ： `$ composer require wjl/encrypt`
- 或在项目中的 `composer.json` 文件中添加依赖：

```
"require": {
   "wjl/encrypt": "*"
}
```

- 执行 `$ composer install`

#### 直接下载源码安装

[](#直接下载源码安装)

> 直接下载源代码也是一种安装 SDK 的方法，不过因为有版本更新的维护问题，所以这种安装方式**十分不推荐**，但由于种种原因导致无法使用 Composer，所以也提供了这种情况下的备选方案。

- 下载源代码包,解压到项目中 `https://github.com/wjl694403901/encrypt`
- 在项目中引入 autoload

#### 使用 具体参数根据自己需求更改

[](#使用-具体参数根据自己需求更改)

### 加密

[](#加密)

Wjl/Encrypt::encrypt(string $data, string $key, string $algo = self::AES\_128\_ECB, string $iv = '')

### 解密

[](#解密)

Wjl/Encrypt::decrypt(string $data, string $key, string $algo = self::AES\_128\_ECB, string $iv = '')

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity28

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

Every ~0 days

Total

3

Last Release

769d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/77a0ce6f8c29988a02940f8ef370496e7d202e9935ae2ceb8bcd0c9753313ef7?d=identicon)[wjl694403901](/maintainers/wjl694403901)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/wjl-encrypt/health.svg)

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

###  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)[enlightn/security-checker

A PHP dependency vulnerabilities scanner based on the Security Advisories Database.

33732.2M110](/packages/enlightn-security-checker)

PHPackages © 2026

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