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

ActiveLibrary

oh86/encrypt
============

hypeft加密组件

v1.1(4y ago)128MITPHPPHP &gt;=7.2

Since Sep 26Pushed 4y ago1 watchersCompare

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

READMEChangelogDependencies (4)Versions (3)Used By (0)

#### hyperf加密组件

[](#hyperf加密组件)

##### 一、安装

[](#一安装)

```
composer require "oh86/encrypt"
```

##### 二、配置

[](#二配置)

1. 发布配置文件与资源

    ```
    php bin/hyperf.php vendor:publish oh86/encrypt

    ```
2. 配置.env

    ```
    SM4_KEY=08c8e6db4907dc755a6097d0abd417c5	# 32位16进制字符串

    ```

三、使用示例

```
>>> sm3("123");
=> "6e0f9e14344c5406a0cf5a3b4dfb665f87f4a771a31f7edbb5c72874a32b2957"
>>>
>>> $encrypt = sm4_encrypt("hello world")
=> "f7064332db25a4ab8615721c49f49ee6"
>>> sm4_decrypt($encrypt)
=> "hello world"
>>>
>>> $hash = bcrypt("hello")
=> "$2y$10$.D6yacKBoPydxqH8Vg2s1unBRxIWWXV/IEqapNk9qGkTgUR9YWgde"
>>> bcrypt_check("hello", $hash)
=> true

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

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

Total

2

Last Release

1664d ago

### Community

Maintainers

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

---

Top Contributors

[![OneHundred86](https://avatars.githubusercontent.com/u/22148561?v=4)](https://github.com/OneHundred86 "OneHundred86 (3 commits)")

---

Tags

phpencrypthyperfbcryptsm3sm4

###  Code Quality

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[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)
