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

ActiveLibrary[Security](/categories/security)

luguohuakai/rsa
===============

simple ssl rsa sign verify

v1.0.0(2y ago)04MITPHPPHP &gt;=7.4

Since Sep 8Pushed 2y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

rsa 非对称加密
=========

[](#rsa-非对称加密)

simple ssl rsa sign verify

使用方法
====

[](#使用方法)

- 首先生成公钥/私钥对 如: private.pem public.pem

> 生成方式: 自己想办法用什么工具生成

```
```

```
# Linux

# Windows
```

- 公钥加密

```
(new \Luguohuakai\Rsa\Rsa('private.pem','public.pem'))->encode('xxx');
```

- 私钥解密

```
(new \Luguohuakai\Rsa\Rsa('private.pem','public.pem'))->decode('xxx');
```

- 私钥签名
- PSS签名

```
(new \Luguohuakai\Rsa\Rsa('private.pem','public.pem'))->sign('xxx');
(new \Luguohuakai\Rsa\Rsa('private.pem','public.pem'))->signPss('xxx');
```

- 公钥验签
- PSS验签

```
(new \Luguohuakai\Rsa\Rsa('private.pem','public.pem'))->verify('xxx');
(new \Luguohuakai\Rsa\Rsa('private.pem','public.pem'))->verifyPss('xxx');
```

场景解读
----

[](#场景解读)

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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

983d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0f4e6db0dd083b1cc18593e5eb511d7afbd6ac00c0c0caab1ce9f3e82f8e58b8?d=identicon)[luguohuakai](/maintainers/luguohuakai)

---

Top Contributors

[![luguohuakai](https://avatars.githubusercontent.com/u/16839001?v=4)](https://github.com/luguohuakai "luguohuakai (5 commits)")

### Embed Badge

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

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

###  Alternatives

[singpolyma/openpgp-php

Pure-PHP implementation of the OpenPGP Message Format (RFC 4880)

184795.6k10](/packages/singpolyma-openpgp-php)[payu/apple-pay

ApplePay Token Decoder

51983.2k](/packages/payu-apple-pay)[mlocati/ocsp

Library to query HTTPS Certificates revocation status using the Online Certificate Status Protocol (OCSP)

40754.7k2](/packages/mlocati-ocsp)[spatie/ssl-certificate-chain-resolver

SSL certificate chain resolver

3069.6k](/packages/spatie-ssl-certificate-chain-resolver)[camcima/dukpt-php

DUKPT implementation in PHP

25153.1k](/packages/camcima-dukpt-php)

PHPackages © 2026

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