PHP code example of insitaction / field-encrypt-bundle
1. Go to this page and download the library: Download insitaction/field-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/ */
insitaction / field-encrypt-bundle example snippets
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Insitaction\FieldEncryptBundle\Doctrine\DBAL\Types\EncryptedString;
class MyEntity
{
#[ORM\Column(type: EncryptedString::ENCRYPTED_STRING, unique: true)]
private mixed $myPrivateEncryptedField;
#[ORM\Column(type: 'string', unique: true)]
private string $email;
public function getUniqueIdentifier(): string
{
return $this->email;
}
}