PHPackages                             layman/laravel-envelope - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. layman/laravel-envelope

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

layman/laravel-envelope
=======================

A Laravel package for crypto functionality.

v1.0.0(11mo ago)020MITPHPPHP ^7.0|^8.0

Since Aug 1Pushed 11mo agoCompare

[ Source](https://github.com/cc-layman/laravel-envelope)[ Packagist](https://packagist.org/packages/layman/laravel-envelope)[ RSS](/packages/layman-laravel-envelope/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

laravel-envelope 🔐
==================

[](#laravel-envelope-)

laravel-envelope使用RSA和AES进行混合加密，支持安全的客户端-服务器通信和数字签名。

📦 安装
----

[](#-安装)

```
composer require layman/laravel-envelope
```

⚙️ 发布配置
-------

[](#️-发布配置)

```
php artisan vendor:publish --provider="Layman\LaravelEnvelope\EnvelopeServiceProvider" --tag=config
```

🛠️ 执行命令
-------

[](#️-执行命令)

```
php artisan envelope:generate
```

🚀 使用
----

[](#-使用)

```
use Layman\LaravelEnvelope\Facades\Envelope;

// 获取公钥（可用于客户端加密 AES 密钥）
Envelope::getPublicKey();
 // 解密
Envelope::decrypt($encrypted = "公钥加密的AES密钥", $nonce = "AES加密的随机数", $data = "AES加密数据");
// 签名
Envelope::signature($data = ["签名数据数组"]);
// 客户端验证签名
Envelope::clientVerifySignature($data = ["验签数据数组"], $signature = "服务端签名");
// 客户端加密
Envelope::clientEncryptData($data = ["需加密数据数组"]);
```

免责声明
----

[](#免责声明)

- 扩展包作者不对本工具的安全性、完整性、可靠性、有效性、正确性或适用性做任何明示或暗示的保证，也不对本扩展包的使用造成的任何直接或间接的损失、责任、索赔、要求或诉讼承担任何责任。
- 扩展包作者保留随时修改、更新、删除权利，无需事先通知或承担任何义务。
- 使用者在下载、安装、运行或使用本扩展包时，即表示已阅读并同意本免责声明。如有异议，请立即停止使用本扩展包，并删除所有相关文件。

🙌 支持与贡献
-------

[](#-支持与贡献)

欢迎提 Issue 或 PR 来改进此包。你的每一个建议和贡献，都是我们前进的动力！

如果你觉得 Laravel-WebSocket 有帮助，别忘了点个 ⭐ Star 哦！

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance52

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

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

Unknown

Total

1

Last Release

336d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/095b12967909c1d57ae0a235cff4ab51fc008994405324f0632a212a4fa61b45?d=identicon)[layman](/maintainers/layman)

---

Top Contributors

[![cc-layman](https://avatars.githubusercontent.com/u/28285020?v=4)](https://github.com/cc-layman "cc-layman (5 commits)")

### Embed Badge

![Health badge](/badges/layman-laravel-envelope/health.svg)

```
[![Health](https://phpackages.com/badges/layman-laravel-envelope/health.svg)](https://phpackages.com/packages/layman-laravel-envelope)
```

###  Alternatives

[neos/seo

SEO configuration and tools for Neos

141.0M31](/packages/neos-seo)

PHPackages © 2026

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