2017 © Pedro Peláez
 

library doctrine-encrypt

Package encrypts and decrypts Doctrine fields through life cycle events.

image

nepda/doctrine-encrypt

Package encrypts and decrypts Doctrine fields through life cycle events.

  • Friday, November 24, 2017
  • by nepda
  • Repository
  • 3 Watchers
  • 1 Stars
  • 3,331 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 121 Forks
  • 0 Open issues
  • 14 Versions
  • 24 % Grown

The README.md

DoctrineEncrypt

Build Status, (*1)

Package encrypts and decrypts Doctrine fields through life cycle events. This version of the Doctrine Encrypt package distinguishes itself with the following features:, (*2)

  • Superior Annotation parsing & caching using Doctrine's built in libraries for superior performance
  • Totally transparent field encryption: the value will only be encrypted in the database, never in the value
  • Unit testing

Tests

Tests currently run with PHP 7.1, 7.2, (*3)

Installation

Add nepda/doctrine-encrypt to your Composer manifest., (*4)

{
    "require": {
        "nepda/doctrine-encrypt": "~7.0"
    }
}

Configuration

Using ZF2

Check out the doctrine-encrypt-module at https://github.com/nepda/doctrine-encrypt-module, (*5)

Manually

Add the event subscriber to your entity manager's event manager. Assuming $em is your configured entity manager:, (*6)

<?php

//You should pick your own hexadecimal secret
$secret = pack("H*", "dda8e5b978e05346f08b312a8c2eac03670bb5661097f8bc13212c31be66384c");

$subscriber = new DoctrineEncryptSubscriber(
    new \Doctrine\Common\Annotations\AnnotationReader,
    new \DoctrineEncrypt\Encryptors\AES256Encryptor($secret)
);

$eventManager = $em->getEventManager();
$eventManager->addEventSubscriber($encrypt_subscriber);

Usage

<?php

namespace Your\CoolNamespace;

use Doctrine\ORM\Mapping as ORM;

use DoctrineEncrypt\Configuration\Encrypted;

/**
 * @ORM\Entity
 */
class Entity
{
    /**
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     * @ORM\Column(type="integer")
     * @var int
     */
    protected $id;

    /**
     * @ORM\Column(type="text")
     * @Encrypted
     * @var string
     */
    protected $secret_data;
}

License

This bundle is under the MIT license. See the complete license in the bundle, (*7)

Versions

I'm using Semantic Versioning like described here., (*8)

The Versions

24/11 2017

dev-master

9999999-dev

Package encrypts and decrypts Doctrine fields through life cycle events.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Victor Melnik

doctrine encrypt aes256 decrypt

24/11 2017

v7.0.1

7.0.1.0

Package encrypts and decrypts Doctrine fields through life cycle events.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Victor Melnik

doctrine encrypt aes256 decrypt

24/11 2017

v7.0.0

7.0.0.0

Package encrypts and decrypts Doctrine fields through life cycle events.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Victor Melnik

doctrine encrypt aes256 decrypt

21/01 2017

v6.0.2

6.0.2.0

Package encrypts and decrypts Doctrine fields through life cycle events.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Victor Melnik

doctrine encrypt aes256 decrypt

20/01 2017

v6.0.1

6.0.1.0

Package encrypts and decrypts Doctrine fields through life cycle events.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Victor Melnik

doctrine encrypt aes256 decrypt

20/01 2017

v6.0.0

6.0.0.0

Package encrypts and decrypts Doctrine fields through life cycle events.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Victor Melnik

doctrine encrypt aes256 decrypt

08/03 2016

v5.0.1

5.0.1.0

Package encrypts and decrypts Doctrine fields through life cycle events.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Victor Melnik

doctrine encrypt aes256 decrypt

05/02 2016

v5.0.0

5.0.0.0

Package encrypts and decrypts Doctrine fields through life cycle events.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Victor Melnik

doctrine encrypt aes256 decrypt

30/05 2014

v4.0.0

4.0.0.0

Package encrypts and decrypts Doctrine fields through life cycle events.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Victor Melnik

doctrine encrypt aes256 decrypt

26/06 2013

v3.0.1

3.0.1.0

Package encrypts and decrypts Doctrine fields through life cycle events.

  Sources   Download

MIT

The Requires

 

by Victor Melnik

doctrine encrypt aes256 decrypt

26/06 2013

v3.0.0

3.0.0.0

Package encrypts and decrypts Doctrine fields through life cycle events.

  Sources   Download

MIT

The Requires

 

by Victor Melnik

doctrine encrypt aes256 decrypt

05/01 2013

2.0.1

2.0.1.0

Symfony 2 bundle which allows to encrypt data in database with some encrypt algorithm

  Sources   Download

MIT

The Requires

 

by Victor Melnik

doctrine encrypt aes256 decrypt

17/11 2012

2.0.0

2.0.0.0

Symfony 2 bundle which allows to encrypt data in database with some encrypt algorithm

  Sources   Download

MIT

The Requires

 

by Victor Melnik

doctrine encrypt aes256 decrypt

14/11 2012

1.0.0

1.0.0.0

Symfony 2 bundle which allows to encrypt data in database with some encrypt algorithm

  Sources   Download

MIT

The Requires

 

by Victor Melnik

doctrine encrypt aes256 decrypt