PHPackages                             hamoi1/eloquent-encryptable - 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. [Database &amp; ORM](/categories/database)
4. /
5. hamoi1/eloquent-encryptable

ActiveLibrary[Database &amp; ORM](/categories/database)

hamoi1/eloquent-encryptable
===========================

This package provides a way to encrypt and decrypt the data in the database using the Hill Cipher algorithm.

0.1.3(1y ago)4129MITPHPPHP ^8.3

Since Jan 14Pushed 10mo ago1 watchersCompare

[ Source](https://github.com/Hamoi1/eloquent-encryptable)[ Packagist](https://packagist.org/packages/hamoi1/eloquent-encryptable)[ RSS](/packages/hamoi1-eloquent-encryptable/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (1)Versions (5)Used By (0)

🔐 Eloquent Encryptable
======================

[](#-eloquent-encryptable)

 [![Laravel](https://camo.githubusercontent.com/5a580364ff3bd338370177402c5c050ff81a1933927e1e475c920c90850b38a3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d4646324432303f7374796c653d666f722d7468652d6261646765266c6f676f3d6c61726176656c266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/5a580364ff3bd338370177402c5c050ff81a1933927e1e475c920c90850b38a3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d4646324432303f7374796c653d666f722d7468652d6261646765266c6f676f3d6c61726176656c266c6f676f436f6c6f723d7768697465) [![PHP](https://camo.githubusercontent.com/d282cc3193faee11ee32307d0c4c9d809e8fafa4b3a8c12c6afbf35d4f7ec617/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d3737374242343f7374796c653d666f722d7468652d6261646765266c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/d282cc3193faee11ee32307d0c4c9d809e8fafa4b3a8c12c6afbf35d4f7ec617/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d3737374242343f7374796c653d666f722d7468652d6261646765266c6f676f3d706870266c6f676f436f6c6f723d7768697465) [![Hill Cipher](https://camo.githubusercontent.com/ccde73186e947a89e05793a48119bd6af3ba55c33743f2e7e3280b81251648a6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f456e6372797074696f6e2d48696c6c5f4369706865722d626c75653f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/ccde73186e947a89e05793a48119bd6af3ba55c33743f2e7e3280b81251648a6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f456e6372797074696f6e2d48696c6c5f4369706865722d626c75653f7374796c653d666f722d7468652d6261646765)

 **A powerful Laravel package for encrypting Eloquent model attributes using the Hill Cipher algorithm with multi-language support.**

 [![License](https://camo.githubusercontent.com/b405d0580f74631e2af8b36910946e71c83287821a36ec0b09ac2f30752feb97/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f68616d6f69312f656c6f7175656e742d656e637279707461626c653f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/b405d0580f74631e2af8b36910946e71c83287821a36ec0b09ac2f30752feb97/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f68616d6f69312f656c6f7175656e742d656e637279707461626c653f7374796c653d666c61742d737175617265) [![Version](https://camo.githubusercontent.com/bd6ea1ec0fbf9f5f6212634c534cba1d19e39cb14a31aeb20e829423ae138d34/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d302e312e342d627269676874677265656e3f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/bd6ea1ec0fbf9f5f6212634c534cba1d19e39cb14a31aeb20e829423ae138d34/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d302e312e342d627269676874677265656e3f7374796c653d666c61742d737175617265) [![Laravel Version](https://camo.githubusercontent.com/8d24505dcfff304efe78da685a78d00d5eb78da02604701bb27e3b5326338351/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31312532422d6f72616e67653f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/8d24505dcfff304efe78da685a78d00d5eb78da02604701bb27e3b5326338351/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31312532422d6f72616e67653f7374796c653d666c61742d737175617265)

---

✨ Features
----------

[](#-features)

- 🔒 **Hill Cipher Encryption**: Advanced matrix-based encryption algorithm
- 🌐 **Multi-language Support**: English, Kurdish, and Arabic character sets
- 🚀 **Automatic Encryption/Decryption**: Seamless model attribute handling
- ✅ **Validation Rules**: Built-in unique and exists validation for encrypted fields
- 🎨 **Blade Directives**: Easy encryption/decryption in views
- 🔄 **Key Rotation**: Re-encrypt data with new keys using console commands
- ⚡ **Performance Optimized**: Chunked processing for large datasets

---

📋 Table of Contents
-------------------

[](#-table-of-contents)

- [Installation](#-installation)
- [Configuration](#-configuration)
- [Usage](#-usage)
    - [Basic Usage](#basic-usage)
    - [Validation Rules](#validation-rules)
    - [Blade Directives](#blade-directives)
    - [Console Commands](#console-commands)
- [Advanced Usage](#-advanced-usage)
- [API Reference](#-api-reference)
- [Troubleshooting](#-troubleshooting)
- [Contributing](#-contributing)
- [License](#-license)

---

🚀 Installation
--------------

[](#-installation)

Install the package via Composer:

```
composer require hamoi1/eloquent-encryptable
```

Publish the configuration file:

```
php artisan vendor:publish --provider="Hamoi1\EloquentEncryptAble\EloquentEncryptAbleServiceProvider" --tag="config"
```

---

⚙️ Configuration
----------------

[](#️-configuration)

After publishing, configure your encryption settings in `config/eloquent-encryptable.php`:

```
