To make your life a little easier we created some commands that you can use for encrypting and decrypting your current database.
You can use the comment doctrine:encrypt:status to get the current database and encryption information.
$ php bin/console doctrine:encrypt:status
The result will look like this:
Show entities with encrypted properies
=====================================
Found 1 entities.
----------------------- ---------------------------------------------------------------------------------
Class Name Properties
----------------------- ---------------------------------------------------------------------------------
BankSepaMandate accountNumber, bankCodeNumber, internationalBankAccountNumber, bankIdentifierCode
----------------------- ------------------------------------------------------------- -------------------
You can use the comment doctrine:encrypt:database [encryptor] to encrypt the current database.
- Optional parameter [encryptor]
- An encryptor provided by the bundle (defuse or halite) or your own encryption class.
- Default: Your encryptor set in the configuration file or the default encryption class when not set in the configuration file
$ php bin/console doctrine:encrypt:database
You can use the comment doctrine:decrypt:database to decrypt the current database.
$ php bin/console doctrine:decrypt:database
You may want to use your own encryption class learn how here: