PHP code example of nowo-tech / doctrine-encrypt-bundle
1. Go to this page and download the library: Download nowo-tech/doctrine-encrypt-bundle library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
nowo-tech / doctrine-encrypt-bundle example snippets
return [
// ...
Nowo\DoctrineEncryptBundle\NowoDoctrineEncryptBundle::class => ['all' => true],
];
use Nowo\DoctrineEncryptBundle\Configuration\Encrypted;
#[ORM\Entity]
class User
{
#[ORM\Column(type: 'string')]
#[Encrypted] // or #[Encrypted('default')] — uses default_profile
private ?string $email = null;
}
#[ORM\Column(type: 'string')]
#[Encrypted('personal_data')]
private ?string $email = null;
#[ORM\Column(type: 'string')]
#[Encrypted('financial_data')]
private ?string $iban = null;