PHPackages                             nauhand/laravel-data-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. nauhand/laravel-data-encryption

ActiveLibrary[Security](/categories/security)

nauhand/laravel-data-encryption
===============================

A Laravel package for data encryption and decryption using RSA keys

1.0.1(2y ago)012MITPHPPHP ^8.1

Since Jun 25Pushed 2y ago1 watchersCompare

[ Source](https://github.com/pmt-nauhand/laravel-data-encryption)[ Packagist](https://packagist.org/packages/nauhand/laravel-data-encryption)[ RSS](/packages/nauhand-laravel-data-encryption/feed)WikiDiscussions main Synced yesterday

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

Laravel Data Encryption
=======================

[](#laravel-data-encryption)

A Laravel package for json data encryption and decryption using RSA pair keys.

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

[](#installation)

You can install the package via Composer:

```
composer require nauhand/laravel-data-encryption
```

How to use
----------

[](#how-to-use)

1. Generate RSA keys First you'll need to generate a public and private RSA key. To do this, follow the instructions below

```
openssl genrsa -out private.key 2048
openssl rsa -in private.key -pubout -out public.key
```

You can then store your private and public keys in the storage directory of your laravel application in any subfolder or directly in the root of the folder.

2. Laravel project configuration Once your keys have been generated and stored, you will now add these two variables to the environment file : SSL\_PUBLIC\_KEY\_PATH="your/storage/path/file.key" and SSL\_PRIVATE\_KEY\_PATH="your/storage/path/file.key". Once this has been done, add these configurations to your config/app.php file so that the package can take them into account.

```
'ssl_public_key_path' => env('SSL_PUBLIC_KEY_PATH'),
'ssl_private_key_path' => env('SSL_PRIVATE_KEY_PATH'),
```

3. Encrypt and decrypt data Now you can use the package to encrypt and decrypt json data. Here's an example of how to do:

### To encrypt :

[](#to-encrypt-)

This method is useful if you wish to encrypt json data. For example, if you store data in your database such as tokens or keys formatted as json strings, it would be useful to hide this information for data integrity purposes.

```
DataEncryption::encrypt($jsonString, config('app.ssl_public_key_path'));
```

### To decrypt :

[](#to-decrypt-)

```
DataEncryption::decrypt($encryptedString, config('app.ssl_private_key_path'));
```

Crédits
-------

[](#crédits)

- **NAUHAND ALLOU** - Développeur principal - [Email](mailto:olivier.nauhand@gmail.com)

Licence
-------

[](#licence)

Ce projet est sous licence MIT - voir le fichier [LICENSE](LICENSE) pour plus de détails.

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

Every ~0 days

Total

2

Last Release

738d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/40299207?v=4)[Franck Olivier Nauhand](/maintainers/nauhand)[@nauhand](https://github.com/nauhand)

---

Top Contributors

[![pmt-nauhand](https://avatars.githubusercontent.com/u/171827707?v=4)](https://github.com/pmt-nauhand "pmt-nauhand (1 commits)")

### Embed Badge

![Health badge](/badges/nauhand-laravel-data-encryption/health.svg)

```
[![Health](https://phpackages.com/badges/nauhand-laravel-data-encryption/health.svg)](https://phpackages.com/packages/nauhand-laravel-data-encryption)
```

###  Alternatives

[illuminate/encryption

The Illuminate Encryption package.

9630.7M326](/packages/illuminate-encryption)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M345](/packages/psalm-plugin-laravel)[laravel-chronicle/core

Tamper-evident audit ledger for Laravel applications.

1213.2k3](/packages/laravel-chronicle-core)

PHPackages © 2026

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