2017 © Pedro Peláez
 

library doctrine-encrypt

A package for the safe encryption of Doctrine fields

image

jackprice/doctrine-encrypt

A package for the safe encryption of Doctrine fields

  • Wednesday, June 14, 2017
  • by JackPrice
  • Repository
  • 1 Watchers
  • 1 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

jackprice/doctrine-encrypt

Build Status, (*1)

A package for the safe encryption and decryption of Doctrine fields., (*2)

Usage

Register the custom encrypted Doctrine type somewhere in the initialisation of your application., (*3)

<?php

\Doctrine\DBAL\Types\Type::addType(
    \DoctrineEncrypt\Types\Encrypted::ENCRYPTED,
    \DoctrineEncrypt\Types\Encrypted::class
);

Set the encryption key., (*4)

Important: You are responsible for securing and generating a strong key., (*5)

<?php

$encryptor = new \DoctrineEncrypt\Encryptors\AES256Encryptor(sha1('Use a very strong key here'));
\DoctrineEncrypt\Types\Encrypted::setEncryptor($encryptor);

Use the encrypted type in your entities., (*6)

<?php

class MyEntity
{
    /**
     * @ORM\Column(type="encrypted") 
     */
    protected $encrypted;
}

TODO

  • [ ] Add more documentation
  • [ ] Handle unencrypted fields
  • [ ] Create a CLI to encrypt fields
  • [ ] Allow key rotation

The Versions

14/06 2017

dev-master

9999999-dev

A package for the safe encryption of Doctrine fields

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jack Price

14/06 2017

0.1.0

0.1.0.0

A package for the safe encryption of Doctrine fields

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jack Price