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

ActiveLibrary[Security](/categories/security)

lwl1989/rsa
===========

A sample RSA encrypt library

46PHP

Since Nov 30Pushed 9y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

RSA
===

[](#rsa)

一个PHP生成RSA加密和解密的包

\###示例（example）

```
namespace example;
use FreshLi\Rsa\RSAGenerate;
use FreshLi\Rsa\Provider;

class Example{

	public function login()
	{
		  $serverProvider = new Provider(['private_key' =>$_SESSION['private_key']]);
		  $password = $serverProvider->decodePublicEncode($password);
		  var_dump($password);
		  //todo: do login
	}

	public function getPublicKey()
	{
		$rsaGenerate = new RSAGenerate();
		$publicKey = $rsaGenerate->getPublicKey();
		$_SESSION['private_key'] = $rsaGenerate->getPrivateKey();
		echo json_encode(['publicKey'=>$publicKey]);
	}

	public function test()
	{
		$rsa = new RSAGenerate();
		$publicKey = $rsa->getPublicKey();
		$privateKey = $rsa->getPrivateKey();
		$serverProvider = new Provider(['public_key'=>$publicKey,'private_key'=>$privateKey]);
		$pass =  $serverProvider->publicKeyEncode('12345');
		$pass = $serverProvider->decodePublicEncode($pass);
		echo $pass;
	}
}

```

\####author email:

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13486464?v=4)[李文龍(Mars)](/maintainers/lwl1989)[@lwl1989](https://github.com/lwl1989)

---

Top Contributors

[![lwl1989](https://avatars.githubusercontent.com/u/13486464?v=4)](https://github.com/lwl1989 "lwl1989 (7 commits)")

### Embed Badge

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

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

###  Alternatives

[mews/purifier

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

2.0k18.0M134](/packages/mews-purifier)[paragonie/ecc

PHP Elliptic Curve Cryptography library

24772.0k35](/packages/paragonie-ecc)

PHPackages © 2026

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