PHPackages                             sumeetghimire/encrypt-decrypt-with-key - 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. sumeetghimire/encrypt-decrypt-with-key

ActiveLibrary

sumeetghimire/encrypt-decrypt-with-key
======================================

A Laravel package for encrypting and decrypting strings with a key (Fixed: Prevents repeated key generation)

1.0.5(9mo ago)337MITPHPPHP ^8.1

Since Dec 3Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/sumeetghimire/encrypt-decrypt-with-key)[ Packagist](https://packagist.org/packages/sumeetghimire/encrypt-decrypt-with-key)[ RSS](/packages/sumeetghimire-encrypt-decrypt-with-key/feed)WikiDiscussions main Synced 1mo ago

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

EncryptDecryptWithKey
=====================

[](#encryptdecryptwithkey)

Laravel EncryptDecryptWithKey Package - Version 1.0.5
-----------------------------------------------------

[](#laravel-encryptdecryptwithkey-package---version-105)

### 🚀 Key Generation Fix

[](#-key-generation-fix)

**Fixed Issue:** The package was previously generating new encryption keys on every request, which caused performance issues and potential data corruption.

**What was fixed:**

- Added key caching to prevent repeated environment variable reads
- Improved service provider to only generate keys once during installation
- Enhanced error handling and key validation

### Configuration

[](#configuration)

You can customize the package configuration by modifying the `config/encrypt-decrypt.php` file.

### License

[](#license)

The Laravel EncryptDecryptWithKey package is open-sourced software licensed under the MIT license.

### Support

[](#support)

For any issues or suggestions, please open an issue on [GitHub](https://github.com/sumeetghimire/encrypt-decrypt-with-key).

### Credits

[](#credits)

This package is maintained by Sumeet Ghimire.

Laravel
-------

[](#laravel)

Require this package in your `composer.json` and update composer.

```
composer require sumeetghimire/encrypt-decrypt-with-key
```

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

[](#example-how-to-use)

 `    use SumeetGhimire\EncryptDecryptWithKey\EncryptionHelper;    $encryptedString = EncryptionHelper::encryptString('test');    $decryptedString = EncryptionHelper::decryptString($encryptedString);    return $decryptedString; // Returns 'test'  `### Key Management

[](#key-management)

- **Automatic Generation:** The package will automatically generate a secure key if none exists
- **Key Caching:** Keys are cached in memory for performance
- **Key Rotation:** Use `EncryptionHelper::clearCache()` to clear cached keys when rotating

In .env key will be auto generated change as per your requirement

 `          ENCRYPT_KEY=8141b227d15377e8249b4c2cd42df4a7  `

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance58

Moderate activity, may be stable

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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 ~205 days

Total

4

Last Release

275d ago

### Community

Maintainers

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

---

Top Contributors

[![sumeetghimire](https://avatars.githubusercontent.com/u/42274174?v=4)](https://github.com/sumeetghimire "sumeetghimire (38 commits)")

### Embed Badge

![Health badge](/badges/sumeetghimire-encrypt-decrypt-with-key/health.svg)

```
[![Health](https://phpackages.com/badges/sumeetghimire-encrypt-decrypt-with-key/health.svg)](https://phpackages.com/packages/sumeetghimire-encrypt-decrypt-with-key)
```

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11320.2M21](/packages/anourvalar-eloquent-serialize)[namu/wirechat

A Laravel Livewire messaging app for teams with private chats and group conversations.

54324.5k](/packages/namu-wirechat)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135192.6k5](/packages/statamic-rad-pack-runway)

PHPackages © 2026

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