insitaction/field-encrypt-bundle
最新稳定版本:3.0.5
Composer 安装命令:
composer require insitaction/field-encrypt-bundle
包简介
Allows automatic encryption of fields, as required by GDPR.
README 文档
README
Field Encrypt
Field Encrypt is a symfony bundle which allows to encrypt the fields in the database as required by the GDPR.
Installation:
composer require insitaction/field-encrypt-bundle
Environment:
You must define the ENCRYPT_KEY var in your .env file.
The ENCRYPT_KEY must be an aes-256-cbc key with the 32 first characters.
Usage:
You must add the EncryptedString::ENCRYPTED_STRING type attribute to the field you want to encrypt/decrypt.
Let's see an example:
<?php 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; } }
That's else !
统计信息
- 总下载量: 6.08k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-12-29