PHPackages                             xorgxx/neox-doctrine-secure-bundle - 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. xorgxx/neox-doctrine-secure-bundle

Abandoned → [xorgxx/doctrine-encryptor-bundle](/?search=xorgxx%2Fdoctrine-encryptor-bundle)Library[Security](/categories/security)

xorgxx/neox-doctrine-secure-bundle
==================================

This bundle provides Encrypt/Decrypt data sensible in a Db system in your application.Its main goal is to make it simple for you to manage encrypt &amp; decrypt sensible data into Db!This bundle is to refresh the old bundle \[DoctrineEncryptBundle\]

2391PHP

Since Feb 18Pushed 2y ago1 watchersCompare

[ Source](https://github.com/xorgxx/NeoxDoctrineSecureBundle)[ Packagist](https://packagist.org/packages/xorgxx/neox-doctrine-secure-bundle)[ RSS](/packages/xorgxx-neox-doctrine-secure-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

THIS PROJECT WILL BE REMOVED DO USE IN PROD !!!
-----------------------------------------------

[](#this-project-will-be-removed-do-use-in-prod-)

We will refactor all code in same thing more optimize; an idea is to be more clear

new project Name | **DoctrineEncryptorBundle** | ==================================
-----------------------------------------------------------------------------------

[](#new-project-name--doctrineencryptorbundle---)

NeoxDoctrineSecureBundle { Symfony 6/7 }
========================================

[](#neoxdoctrinesecurebundle--symfony-67-)

This bundle provides Encrypt/Decrypt data sensible in a Db system in your application. Its main goal is to make it simple for you to manage encrypt &amp; decrypt sensible data into Db! This bundle is to refresh the old bundle [DoctrineEncryptBundle](https://github.com/absolute-quantum/DoctrineEncryptBundle)

The aim of this bundle is to establish, in an automatic and transparent manner, a robust encryption and decryption system by externalizing data, in strict compliance with European recommendations and the directives of the General Data Protection Regulation (GDPR).

[![2024-02-13-10-33-55.png](https://camo.githubusercontent.com/8e86c4e2a63481de685bf9672517e59d92c54650fd399f1b653d7eb77566a2c7/68747470733a2f2f692e706f7374696d672e63632f363643354b38504b2f323032342d30322d31332d31302d33332d35352e706e67)](https://postimg.cc/145Zc3P7)

Installation BETA VERSION !!
----------------------------

[](#installation-beta-version-)

Install the bundle for Composer !! as is still on a beta version !!

```
  composer require xorgxx/neox-doctrine-secure-bundle
  or
  composer require xorgxx/neox-doctrine-secure-bundle:0.* or dev-master

```

🚨 You will heva to add in your project. 🚨

```
  composer require paragonie/halite

```

.env file

```
  ....
  # standalone = "buit-in" only type string 255, text
  # external   = this mode will externalize data in one entity (TODO : redis )
  NEOX_ENCRY_DSN=standalone://redis
  NEOX_ENCRY_SALT="**@#$#*#&%&@$&^@"    # 16 bit
  NEOX_ENCRY_PWS="03~é][a6{1;a7a^e2d"   # password your want (more long, more secure, more time to process)
  ....

```

neox\_doctrine\_secure.yaml file

```
  neox_doctrine_secure:
      # (default)false or true | it will turn off the bundle. by aware that it will render nothing !! field on front will by empty!!
      # this is only for testing purpose in Development mode !!!
      neox_off: false
      ####
    neox_dsn: "%env(NEOX_ENCRY_DSN)%"
    neox_pws: "%env(NEOX_ENCRY_PWS)%"
    neox_salt: "%env(NEOX_ENCRY_SALT)%"
    neox_encryptor: haliteII # halite or haliteII

```

🚨 You will have to make migration to add NeoxEncryptor entity 🚨

```
  symfony make:migration
  symfony doctrine:migrations:migrate

```

**We have only implemented Halite service to Crypt / unCrypt**

**NOTE:** *You may need to use \[ symfony composer dump-autoload \] to reload autoloading*

..... Done 🎈

Usage !
-------

[](#usage-)

In entity, you want to secure field (data)

```
  use NeoxDoctrineSecure\NeoxDoctrineSecureBundle\Attribute\neoxEncryptor;
  ....

  #[ORM\Column(type: Types::TEXT, nullable: true)]
  #[neoxEncryptor]
  private ?string $content = null;

  ....
```

Important !
-----------

[](#important-)

Consider the size / length of field you want to crypt !! ex: length:10

```
  #[neoxEncryptor]
  #[ORM\Column(length: 20)]
  private ?string $name = null;

  "john doe"  "MUIFAOpLp21iX1Dy2ZNkYbby6zo7ADYgVs-hGkNaWR2OF5AbQUMcBKZHigtFVxZiIFWyOTV8Ts-9q_pNAHBxCKcAPZNJjfPgVQglMLAKi0bZicmPlCQKJpRpX2k5IAjAqawOlFsPpD9KikIEFRhuy"

```

Tools power
-----------

[](#tools-power)

Occasionally, we may require access to a full range of data (4000 lines or more) for various checks or analyses. However, waiting for hours due to the conversion of encrypted data is not desirable. In such cases, disabling the EventListener is imperative.

```
  use NeoxDoctrineSecure\NeoxDoctrineSecureBundle\Pattern\NeoxDoctrineTools;
  ...
  // this will stop eventlistener to decrypt
  $neoxTableBuilder->EventListener();

  $entity = $parametersRepository->findAll()

  // this will restart eventlistener to decrypt
  $neoxTableBuilder->EventListener(true);

  // data on the field encrypted will be empty

```

[🚨🚨 **FEATURE ADVANCE** in the box in a future version](Doc/External.md)

Contributing
------------

[](#contributing)

If you want to contribute (thank you!) to this bundle, here are some guidelines:

- Please respect the [Symfony guidelines](http://symfony.com/doc/current/contributing/code/standards.html)
- Test everything! Please add tests cases to the tests/ directory when:
    - You fix a bug that wasn't covered before
    - You add a new feature
    - You see code that works but isn't covered by any tests (there is a special place in heaven for you)

Todo
----

[](#todo)

\* Add a Remote system for storage Hash =&gt; Key\* to be able to encrypt/decrypt, according to a propriety type | int, string, phone ....

- Custom provider class Encrypt/decrypt.
- Dispatcher to custom code.
- Command wasaaaa : to manage more easily status, encrypt, decrypt ....

Thanks
------

[](#thanks)

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity19

Early-stage or recently created project

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/535aee9854a7fc4b23deba19f4b864abfede75d03724ea43a0466ae32991b443?d=identicon)[xorgxx](/maintainers/xorgxx)

### Embed Badge

![Health badge](/badges/xorgxx-neox-doctrine-secure-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/xorgxx-neox-doctrine-secure-bundle/health.svg)](https://phpackages.com/packages/xorgxx-neox-doctrine-secure-bundle)
```

###  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)
