PHPackages                             pdaleramirez/asymmetric-encryption - 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. pdaleramirez/asymmetric-encryption

ActiveLibrary[Security](/categories/security)

pdaleramirez/asymmetric-encryption
==================================

A laravel package that encrypts your data with private public key pairs using asymmetric encryption.

1.0.0(6y ago)4153PHPPHP &gt;=7.1.0CI failing

Since Feb 24Pushed 4y ago1 watchersCompare

[ Source](https://github.com/pdaleramirez/asymmetric-encryption)[ Packagist](https://packagist.org/packages/pdaleramirez/asymmetric-encryption)[ Docs](https://github.com/pdaleramirez/asymmetric-encryption)[ RSS](/packages/pdaleramirez-asymmetric-encryption/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (2)Used By (0)

Laravel 5.5+ Asymmetric Encryption Package
==========================================

[](#laravel-55-asymmetric-encryption-package)

A laravel package that encrypts your data with private public key pairs using asymmetric encryption.

The way it works is that it encrypts the data with a symmetric key, then asymmetrically encrypt the key and attach it to the data. Useful for encrypting large data. More details here:

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

[](#installation)

### Step 1: Composer

[](#step-1-composer)

Via Composer command line:

```
$ composer require pdaleramirez/asymmetric-encryption
```

Or add the package to your `composer.json`:

```
{
    "require": {
        " pdaleramirez/asymmetric-encryption": "^1.0.0"
    }
}
```

### Step 2: Enable the package

[](#step-2-enable-the-package)

```
'providers' => [
    pdaleramirez\asymmetric\encryption\AsymmetricEncryptionProvider::class
];
```

And then add the alias to your `config/app.php` file:

```
'aliases' => [
    'AsymmetricEncryption' => pdaleramirez\asymmetric\encryption\AsymmetricEncryptionFacade::class
];
```

### Usage:

[](#usage)

Generate the key pairs:

```
$keys = \AsymmetricEncryption::createKeys();

```

Encrypting and Decrypting

```
$textToEncrypt = 'text to encrypt';
$privateKey = file_get_contents('keys/private.key');
$publicKey = file_get_contents('keys/public.pem');

$encryptedData = \AsymmetricEncryption::encrypt($textToEncrypt, $publicKey);

$decryptedData = \AsymmetricEncryption::>decrypt($encryptedData, $privateKey);

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% 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

2267d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/80ecfeba39735012c4d9816b834a200b55b09e5338357329edb98ecbb2bfe183?d=identicon)[pdaleramirez](/maintainers/pdaleramirez)

---

Top Contributors

[![pdaleramirez](https://avatars.githubusercontent.com/u/4172750?v=4)](https://github.com/pdaleramirez "pdaleramirez (2 commits)")[![khamburger](https://avatars.githubusercontent.com/u/14111889?v=4)](https://github.com/khamburger "khamburger (1 commits)")

---

Tags

laravelencryptionencryptAsymmetric encryption

### Embed Badge

![Health badge](/badges/pdaleramirez-asymmetric-encryption/health.svg)

```
[![Health](https://phpackages.com/badges/pdaleramirez-asymmetric-encryption/health.svg)](https://phpackages.com/packages/pdaleramirez-asymmetric-encryption)
```

###  Alternatives

[sbamtr/laravel-source-encrypter

Laravel Source Encrypter

58545.6k](/packages/sbamtr-laravel-source-encrypter)[soved/laravel-gdpr

GDPR compliance with ease

299127.5k2](/packages/soved-laravel-gdpr)

PHPackages © 2026

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