PHPackages                             thank/crypto - 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. thank/crypto

Abandoned → [https://github.com/xieguo/crypto](/?search=https%3A%2F%2Fgithub.com%2Fxieguo%2Fcrypto)Library[Security](/categories/security)

thank/crypto
============

Encrypt and decrypt data for PHP, 前端crypto.js + PHP的加解密方案

1.0.5(3y ago)024Apache-2.0PHPPHP &gt;=7.0.0

Since Apr 14Pushed 3y ago1 watchersCompare

[ Source](https://github.com/xieguo/crypto)[ Packagist](https://packagist.org/packages/thank/crypto)[ Docs](https://xieguo.com/)[ RSS](/packages/thank-crypto/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)DependenciesVersions (3)Used By (0)

说明
--

[](#说明)

- 前端crypto.js + PHP的加解密方案

环境
--

[](#环境)

- PHP &gt;= 7.0.7
- openssl &gt;= 1.1.0

安装
--

[](#安装)

- composer require thank/crypto

使用
--

[](#使用)

```
    use thank\cryto

    $config = [
        'key' => 'xxxx', // 加密key
        'iv'  => 'yyyy', // 偏移量
    ];

    // 新建实例
    $aes = new AES($config);

    // 加密 参数$data为数组 $method 的默认值是：AES-256-CBC 返回值是 string
    $aes->encrypt($data, $method);

    // 解密 参数$string为encode后的加密串 $method 的默认值是：AES-256-CBC 返回值是 array
    $aes->eecrypt($string, $method);
```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

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

Total

2

Last Release

1178d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/506bb552f2f43a599a6f45ca220ee9fcac8358086305f70cd7f34618204fb076?d=identicon)[xieguo](/maintainers/xieguo)

---

Top Contributors

[![xieguo](https://avatars.githubusercontent.com/u/12163194?v=4)](https://github.com/xieguo "xieguo (15 commits)")

---

Tags

encryptopenssl

### Embed Badge

![Health badge](/badges/thank-crypto/health.svg)

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

###  Alternatives

[defuse/php-encryption

Secure PHP Encryption Library

3.9k162.4M214](/packages/defuse-php-encryption)[miladrahimi/phpcrypt

Encryption, decryption, and hashing tools for PHP projects

3171.5k2](/packages/miladrahimi-phpcrypt)[hemiframe/php-aes

PHP class for encrypt and decrypt data with AES algorithm

1030.3k](/packages/hemiframe-php-aes)[mpyw/easycrypt

A class that provides simple interface for decryptable encryption.

234.7k](/packages/mpyw-easycrypt)[poly-crypto/poly-crypto

High-level cryptographic functions that are interoperable between NodeJS and PHP 7.1+

127.8k1](/packages/poly-crypto-poly-crypto)

PHPackages © 2026

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