2017 © Pedro Peláez
 

library doctrine-encrypt

Package encrypts and decrypts Doctrine fields through life cycle events.

image

reprovinci/doctrine-encrypt

Package encrypts and decrypts Doctrine fields through life cycle events.

  • Tuesday, June 13, 2017
  • by johnciocoiu
  • Repository
  • 8 Watchers
  • 7 Stars
  • 4,450 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 116 Forks
  • 3 Open issues
  • 10 Versions
  • 1 % Grown

The README.md

DoctrineEncrypt

Package encrypts and decrypts Doctrine fields through life cycle events., (*1)

Installation

Add reprovinci/doctrine-encrypt to your Composer manifest., (*2)

{
    "require": {
        "reprovinci/doctrine-encrypt": "~3.0"
    }
}

Configuration

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

<?php

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

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

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

Usage

<?php

namespace Your\Namespace;

use Doctrine\ORM\Mapping as ORM;

use Reprovinci\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, (*4)

Versions

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

The Versions

13/06 2017

dev-master

9999999-dev

Package encrypts and decrypts Doctrine fields through life cycle events.

  Sources   Download

MIT

The Requires

 

by Victor Melnik

doctrine encrypt aes256 decrypt

13/06 2017

v3.0.5

3.0.5.0

Package encrypts and decrypts Doctrine fields through life cycle events.

  Sources   Download

MIT

The Requires

 

by Victor Melnik

doctrine encrypt aes256 decrypt

04/03 2015

v3.0.4

3.0.4.0

Package encrypts and decrypts Doctrine fields through life cycle events.

  Sources   Download

MIT

The Requires

 

by Victor Melnik

doctrine encrypt aes256 decrypt

11/02 2015

v3.0.3

3.0.3.0

Package encrypts and decrypts Doctrine fields through life cycle events.

  Sources   Download

MIT

The Requires

 

by Victor Melnik

doctrine encrypt aes256 decrypt

11/02 2015

v3.0.2

3.0.2.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.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