PHPackages                             whitestarcode/encryptiondb - 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. whitestarcode/encryptiondb

ActiveLibrary[Security](/categories/security)

whitestarcode/encryptiondb
==========================

A Laravel DB encryption package

00PHP

Since Dec 2Pushed 5mo agoCompare

[ Source](https://github.com/mohammadMghi/encryption-db-laravel)[ Packagist](https://packagist.org/packages/whitestarcode/encryptiondb)[ RSS](/packages/whitestarcode-encryptiondb/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

DbCipher
========

[](#dbcipher)

description
-----------

[](#description)

If you want to give a unique token to each user and they only can access their data and you don't want to have access to users data this package is for you. This is a package for encrypting your data in the database and generate a key for each user and decrypting own data and only accessible with the key.

Install with composer
---------------------

[](#install-with-composer)

`composer require whitestarcode/encryptiondb`

توضیحات
-------

[](#توضیحات)

شما می توانید با این پکیج به هر کاربر یک توکن منحصر به فرد بدهید و فقط کاربر با آن توکن بتواند دیتا خودش را رمزگشایی کند

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

[](#how-to-use)

First add `use Encryptable` to your eloquent model

For each column you want to encrypt creating a bird for example `address_bidx` it helps you when you want to `where` on your columns to find it. It need because `BlindIndexService::make("My address")` generate a one way hash(same input same out put) then when you `where` on your columns it checks out-put with stored hash.

Add `use Encryptable` to your model.

Example usage
-------------

[](#example-usage)

```
$user = User::first();
$generated_key = KeyGenerator::generateKey($user->password);

$key = json_decode(Storage::get('temp.json') , true);

if (!isset($key["key"])) {
    Storage::put('temp.json' , json_encode(
        ["key" => base64_encode($generated_key)]
    ));
}

KeyManager::set($key["key"]);

$address_bidx = BlindIndexService::make("My address");

$order = new Order();
$order->address = "My address";
$order->address_bidx = $address_bidx;
$order->save();

$order = Order::first();

$address_search = BlindIndexService::make("My address");

$order = Order::where("address_bidx" , $address_search)->first();

```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance48

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity13

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

[![mohammadMghi](https://avatars.githubusercontent.com/u/49416231?v=4)](https://github.com/mohammadMghi "mohammadMghi (21 commits)")

### Embed Badge

![Health badge](/badges/whitestarcode-encryptiondb/health.svg)

```
[![Health](https://phpackages.com/badges/whitestarcode-encryptiondb/health.svg)](https://phpackages.com/packages/whitestarcode-encryptiondb)
```

###  Alternatives

[defuse/php-encryption

Secure PHP Encryption Library

3.9k162.4M214](/packages/defuse-php-encryption)[roave/security-advisories

Prevents installation of composer packages with known security vulnerabilities: no API, simply require it

2.9k97.3M6.4k](/packages/roave-security-advisories)[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k16.7M113](/packages/mews-purifier)[robrichards/xmlseclibs

A PHP library for XML Security

41278.1M118](/packages/robrichards-xmlseclibs)[bjeavons/zxcvbn-php

Realistic password strength estimation PHP library based on Zxcvbn JS

86917.5M63](/packages/bjeavons-zxcvbn-php)[enlightn/security-checker

A PHP dependency vulnerabilities scanner based on the Security Advisories Database.

33732.2M110](/packages/enlightn-security-checker)

PHPackages © 2026

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