PHPackages                             insitaction/field-encrypt-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. insitaction/field-encrypt-bundle

ActiveSymfony-bundle[Security](/categories/security)

insitaction/field-encrypt-bundle
================================

Allows automatic encryption of fields, as required by GDPR.

3.0.5(2y ago)56.2kMITPHPPHP &gt;=8.2

Since Jan 31Pushed 2y ago1 watchersCompare

[ Source](https://github.com/JBlairy-Insitaction/field-encrypt)[ Packagist](https://packagist.org/packages/insitaction/field-encrypt-bundle)[ RSS](/packages/insitaction-field-encrypt-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (11)Versions (15)Used By (0)

[![Insitaction](https://camo.githubusercontent.com/4f066c7465be9926ac4c2086d077bac8d3713a7039d78c2f9590a002cdb7f550/68747470733a2f2f7777772e696e736974616374696f6e2e636f6d2f6173736574732f696d672f6c6f676f5f696e736974616374696f6e2e706e67)](https://camo.githubusercontent.com/4f066c7465be9926ac4c2086d077bac8d3713a7039d78c2f9590a002cdb7f550/68747470733a2f2f7777772e696e736974616374696f6e2e636f6d2f6173736574732f696d672f6c6f676f5f696e736974616374696f6e2e706e67)

Field Encrypt
=============

[](#field-encrypt)

Field Encrypt is a symfony bundle which allows to encrypt the fields in the database as required by the GDPR.

Installation:
-------------

[](#installation)

```
composer require insitaction/field-encrypt-bundle
```

Environment:
------------

[](#environment)

You must define the ENCRYPT\_KEY var in your .env file.

The ENCRYPT\_KEY must be an aes-256-cbc key with the 32 first characters.

Usage:
------

[](#usage)

You must add the EncryptedString::ENCRYPTED\_STRING type attribute to the field you want to encrypt/decrypt.

Let's see an example:

```
