PHPackages                             xiaowu/laravel-rsa - 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. xiaowu/laravel-rsa

ActiveLibrary[Security](/categories/security)

xiaowu/laravel-rsa
==================

v1.5(6y ago)32612MITPHPPHP &gt;=7.1.0

Since Mar 14Pushed 6y ago1 watchersCompare

[ Source](https://github.com/Liangxiaowu/laravel-rsa)[ Packagist](https://packagist.org/packages/xiaowu/laravel-rsa)[ RSS](/packages/xiaowu-laravel-rsa/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (6)Used By (0)

laravel-rsa
===========

[](#laravel-rsa)

基于laravel框架封装RSA算法类

#### 简介

[](#简介)

这人比较懒，懒得写了。。。。

#### 环境条件

[](#环境条件)

- PHP &gt;= 7.2
- laravel/Lumen &gt;= 5.7
- 开启php的openssl扩展

#### 安装

[](#安装)

```
    composer require xiaowu/laravel-rsa

```

#### config

[](#config)

生成`config/lararsa.php`配置文件。

```
    php artisan lararsa:config
```

#### 使用

[](#使用)

```
    $data = '待处理数据';

    方式一：
    $sign = LaraRsa::createdSign($data);                // 生成签名

    $result = LaraRsa::verifySign($data, $sign);        // 验证签名

    $result = LaraRsa::encrypt($data);                  // 加密

    $result = LaraRsa::decrypt($data);                  // 解密

    方式二：
    $LaraRsa = new LaraRsa();

    $sign = $LaraRsa->createdSign($data);                // 生成签名

    $result = $LaraRsa->verifySign($data, $sign);        // 验证签名

    $result = $LaraRsa->encrypt($data);                  // 加密

    $result = $LaraRsa->decrypt($data);                  // 解密
```

#### 异常处理

[](#异常处理)

异常类：`RsaKeyException.php`。

#### 更新

[](#更新)

- 2020-03-14 create
- 2020-03-16 更新调用
- 2020-04-01 简单优化
- 2020-04-07 代码优化

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity55

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

Total

5

Last Release

2276d ago

PHP version history (2 changes)v1.0PHP &gt;=7.2.0

v1.5PHP &gt;=7.1.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/40758781?v=4)[xiaowu](/maintainers/Liangxiaowu)[@Liangxiaowu](https://github.com/Liangxiaowu)

---

Top Contributors

[![Liangxiaowu](https://avatars.githubusercontent.com/u/40758781?v=4)](https://github.com/Liangxiaowu "Liangxiaowu (12 commits)")

### Embed Badge

![Health badge](/badges/xiaowu-laravel-rsa/health.svg)

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

###  Alternatives

[mews/purifier

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

2.0k18.7M142](/packages/mews-purifier)[paragonie/ecc

PHP Elliptic Curve Cryptography library

24820.0k37](/packages/paragonie-ecc)

PHPackages © 2026

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