Skip to content

Commit

Permalink
Updated some documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-marcel committed Mar 11, 2015
1 parent 3b4cfcd commit 55f2587
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 12 deletions.
31 changes: 29 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,35 @@ help of some encryption algorithm in database and it will be clearly for develop
This is an fork from the original bundle created by vmelnik-ukrain (Many thanks to him) which can be found here:
[vmelnik-ukraine/DoctrineEncryptBundle](https://github.com/vmelnik-ukraine/DoctrineEncryptBundle)

I improved several things, i make better use of the doctrine events.
and it works with lazy loading (relationships)!
I improved several things, i make better use of the doctrine events. and it works with lazy loading (relationships)!
This will be an long term project we will be working on with long-term support and backward compatibility. We are using this bundle in all our own symfony2 project.
More about us can be found on our website. [Ambta.com](https://ambta.com)

###What does it do exactly

It gives you the opportunity to add the @Encrypt annotation above each (string/text) field

```
/**
* @Encrypt
*/
protected $username;
```

The bundle uses doctrine his life cycle events to encrypt the data when inserted into the database and decrypt the data when loaded into your entity manager.
It is only able to encrypt string values at the moment, numbers and other fields will be added later on in development.

###Advantages and disadvantaged of an encrypted database

####Advantages
- Information is stored safely
- Not worrying about saving backups at other locations
- Unreadable for employees managing the database

####Disadvantages
- Can't use ORDER BY on encrypted data
- In SELECT WHERE statements the where values also have to be encrypted
- When you lose your key you lose your data (Make a backup of the key on a safe location)

###Documentation

Expand Down
9 changes: 2 additions & 7 deletions Resources/doc/configuration_reference.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
#Configuration Reference

All available configuration options are listed below with their default values.
All available configuration options are listed below.

``` yaml

ambta_doctrine_encrypt:

# Secret key for encrypt algorithm. All secret key checks are encryptor tasks only.
# We recommend an 32 character long key (256 bits), Use another key for each project!

# Store a backup of this key on a secure location, losing this key will mean losing your data!
secret_key: ~ # Required

# If you want, you can use your own Encryptor. Encryptor must implements EncryptorInterface interface
# Default: Ambta\DoctrineEncryptBundle\Encryptors\AES256Encryptor

encryptor_class: ~ #optional

```
3 changes: 1 addition & 2 deletions Resources/doc/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#DoctrineEncryptBundle

This bundle is responsible for encryption/decryption of the data in DB. All encryption/decryption work
on PHP side
This bundle is responsible for encryption/decryption of the data in DB. All encryption/decryption work on PHP side

The following documents are available:

Expand Down
2 changes: 1 addition & 1 deletion Resources/doc/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Composer will install the bundle to your project's `vendor/ambta` directory.

### Step 2: Enable the bundle

Enable the bundle in the kernel:
Enable the bundle in the kernel by adding it:

``` php
<?php
Expand Down

0 comments on commit 55f2587

Please sign in to comment.