PHPackages                             jose-chan/rsa-sign - 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. jose-chan/rsa-sign

ActiveLibrary

jose-chan/rsa-sign
==================

Simple Component For Sign By RSA with SHA256

v1.0.0(6y ago)039[1 PRs](https://github.com/ILoveJoseM/rsa-sign/pulls)1MITPHPPHP &gt;=5.3.3

Since Dec 6Pushed 5y ago1 watchersCompare

[ Source](https://github.com/ILoveJoseM/rsa-sign)[ Packagist](https://packagist.org/packages/jose-chan/rsa-sign)[ Docs](http://phpseclib.sourceforge.net)[ RSS](/packages/jose-chan-rsa-sign/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (1)Versions (3)Used By (1)

rsa签名算法
-------

[](#rsa签名算法)

签名算法采用SHA256进行哈希，并使用私钥对哈希值进行加密获得签名
验证签名时，使用公钥解密后获得哈希值和参数哈希后的字符串进行对比验签

> 建议使用长度为2048以上的公私钥对，各个长度的保密年限对比下表附出，超过保密年限的密钥长度不保证安全性

密钥长度保密年限10242010204820303072204076802080153602120#### 安装

[](#安装)

```
composer require "json-chan/rsa-sign"

```

#### 签名

[](#签名)

```
require "vendor/autoload.php";

use JoseChan\RsaSign\PrivateKey;
use JoseChan\RsaSign\Signature;

$private_key = new PrivateKey($key_string);

$sign = Signature::sign($string, $private_key);
```

#### 验签

[](#验签)

```
require "vendor/autoload.php";

use JoseChan\RsaSign\PublicKey;
use JoseChan\RsaSign\Signature;

$public_key = new PublicKey($key_string);

$result = Signature::verify($string, $sign, $public_key);
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

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

2349d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f12bdb88f1ac67fe7ca894318d891f7684edd60ad5c55f1015a49086bd7c1139?d=identicon)[524233828](/maintainers/524233828)

---

Top Contributors

[![524233828](https://avatars.githubusercontent.com/u/11416856?v=4)](https://github.com/524233828 "524233828 (3 commits)")

---

Tags

signaturersa

### Embed Badge

![Health badge](/badges/jose-chan-rsa-sign/health.svg)

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

###  Alternatives

[phpseclib/phpseclib

PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.

5.6k434.8M1.3k](/packages/phpseclib-phpseclib)[spomky-labs/pki-framework

A PHP framework for managing Public Key Infrastructures. It comprises X.509 public key certificates, attribute certificates, certification requests and certification path validation.

2725.9M11](/packages/spomky-labs-pki-framework)[sop/crypto-types

A PHP library of various ASN.1 types for cryptographic applications.

111.4M33](/packages/sop-crypto-types)[codeaken/sshkey

Library for working with and generating SSH keys

1260.0k1](/packages/codeaken-sshkey)

PHPackages © 2026

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