doctrineencryptbundle / doctrine-encrypt-bundle
Encrypted symfony entity's by verified and standardized libraries
Installs: 287 641
Dependents: 0
Suggesters: 0
Security: 0
Stars: 24
Watchers: 7
Forks: 221
Open Issues: 13
pkg:composer/doctrineencryptbundle/doctrine-encrypt-bundle
Requires
- php: >=8.1
- composer-runtime-api: ^2.0
- composer/semver: ^3.0
- doctrine/annotations: ^1.13 || ^2.0
- doctrine/common: ^3.4
- doctrine/dbal: ^2.13.9 || ^3.9.4 || ^4.2.2
- doctrine/doctrine-bundle: ^2.0.8
- doctrine/event-manager: ^1.2 || ^2.0.1
- doctrine/orm: ^2.12 || ^3.3
- paragonie/halite: ^4.6 || ^5.0
- symfony/cache: ^5.4 || ^6.4 || ^7.0
- symfony/config: ^5.4 || ^6.4 || ^7.0
- symfony/console: ^5.4 || ^6.4 || ^7.0
- symfony/dependency-injection: ^5.4 || ^6.4 || ^7.0
- symfony/deprecation-contracts: ^2.5 || ^3.5.1
- symfony/expression-language: ^5.4 || ^6.4 || ^7.0
- symfony/http-kernel: ^5.4 || ^6.4 || ^7.0
- symfony/property-access: ^5.4 || ^6.4 || ^7.0
- symfony/yaml: ^5.4 || ^6.4 || ^7.0
Requires (Dev)
- defuse/php-encryption: ^2.1
- doctrine/cache: ^1.11
- ergebnis/composer-normalize: ^2.48
- friendsofphp/php-cs-fixer: ^3.64.0
- maglnet/composer-require-checker: ^2.1 || ^3.8 || ^4.14
- phpcompatibility/php-compatibility: ^9.3.5
- phpstan/phpstan: ^2.1
- squizlabs/php_codesniffer: ^3.7
- symfony/phpunit-bridge: ^7.2
Suggests
- ext-sodium: Required to use halite encryption library.
- defuse/php-encryption: Alternative for halite for use with older php-versions
- paragonie/sodium_compat: Alternative for ext-sodium for use with older php-versions
README
Introduction
This version of the DoctrineEncryptBundle was initially forked from: integr8rs/DoctrineEncryptBundle
This version was created due to be maintained and managed by a GitHub organization (DoctrineEncryptBundle) due to all previous versions that were installable not being actively maintained any longer. This includes the most popular on as well: michaeldegroot/doctrine-encrypt-bundle
The original bundle created by ambta can be found here: -ambta/DoctrineEncryptBundle
This bundle has updated security by not rolling its own encryption and using verified standardized library's from the field.
Using Halite
All deps are already installed with this package
// Config.yml ambta_doctrine_encrypt: encryptor_class: Halite
Using Defuse
You will need to require Defuse yourself
composer require "defuse/php-encryption ^2.0"
// Config.yml ambta_doctrine_encrypt: encryptor_class: Defuse
Secret key
The secret key should be a max 32 byte hexadecimal string ([0-9a-fA-F]).
Secret key is generated if there is no key found. This is automatically generated and stored in the folder defined in the configuration
// Config.yml ambta_doctrine_encrypt: secret_directory_path: '%kernel.project_dir%' # Default value
Filename example: .DefuseEncryptor.key or .HaliteEncryptor.key
Do not forget to add these files to your .gitignore file, you do not want this on your repository!
Documentation
Demo
Demo-installations can be found in this repository within the demo directory.  These demonstrates how to use
the various supported encryption and decryption implementations.