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

ActiveLibrary

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 today

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 21% 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://www.gravatar.com/avatar/7d6aca5e18ccc2cccffb69f021a05367f74d8c650e389b8e964c8f147341c252?d=identicon)[lwl1989](/maintainers/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)
```

PHPackages © 2026

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