PHPackages                             riskivy/yii2-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. riskivy/yii2-rsa

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

riskivy/yii2-rsa
================

yii2 rsa lib

1.0.3(10y ago)12301GPL-3.0PHP

Since Sep 29Pushed 7y agoCompare

[ Source](https://github.com/riskivy/yii2-rsa)[ Packagist](https://packagist.org/packages/riskivy/yii2-rsa)[ RSS](/packages/riskivy-yii2-rsa/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (4)Versions (5)Used By (0)

yii2-rsa
========

[](#yii2-rsa)

YII2 openssl rsa 加密 签名

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

First run

```
composer require riskivy/yii2-rsa

```

Usage
-----

[](#usage)

components

```
    'rsa' => [
        'class' => 'riskivy\rsa\RSA',
        'publicKey' => 'path/to/publicKey.pem',
        'privateKey' => 'path/to/privateKey.pem',
        'services' => [
            'OpensslRSA' => [
                'class' => riskivy\rsa\OpensslRSA::class,
            ]
        ]
    ],

```

Once the extension is installed, simply use it in your code by :

```
        //use file path
        $publicKey = Yii::$app->rsa->publicKey;
        $privateKey = Yii::$app->rsa->privateKey;

        //use file content
//        $publicKey = privateDecrypt($s1));

        }catch(\Exception $e){

            var_dump($e->getMessage());die;
        }
```

Get rsa\_private\_key and rsa\_public\_key

---

```
openssl genrsa -out rsa_private_key.pem 512
openssl rsa -in rsa_private_key.pem -pubout -out rsa_public_key.pem
```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 54.5% 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 ~4 days

Total

4

Last Release

3868d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6807b05e1abbddc425df6cd457ff572b71eaa80865619ea2462be8076c87beaa?d=identicon)[riskivy](/maintainers/riskivy)

---

Top Contributors

[![riskivy](https://avatars.githubusercontent.com/u/30256536?v=4)](https://github.com/riskivy "riskivy (6 commits)")[![408824338](https://avatars.githubusercontent.com/u/13764212?v=4)](https://github.com/408824338 "408824338 (4 commits)")[![Heimo-He](https://avatars.githubusercontent.com/u/26212318?v=4)](https://github.com/Heimo-He "Heimo-He (1 commits)")

---

Tags

yii2extension

###  Code Quality

TestsCodeception

### Embed Badge

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

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

###  Alternatives

[vyants/yii2-daemon

Extension provides functionality for simple daemons creation and control

7859.0k](/packages/vyants-yii2-daemon)[dmstr/yii2-cookie-consent

Yii2 Cookie Consent Widget

1452.6k](/packages/dmstr-yii2-cookie-consent)[richardfan1126/yii2-js-register

Yii2 widget to register JS into view

1357.2k7](/packages/richardfan1126-yii2-js-register)

PHPackages © 2026

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