elcweb / doctrine-encrypt-bundle
该软件包通过生命周期事件加密和解密Doctrine字段。
v0.2.0
2020-07-07 17:38 UTC
Requires
- php: ^7.2
- ext-sodium: *
- 51systems/doctrine-encrypt: ~6.0
- doctrine/orm: ^2.5
- symfony/framework-bundle: >=4.4
This package is auto-updated.
Last update: 2024-09-08 03:03:38 UTC
README
安装
步骤 1: 使用composer下载
{ "require": { "51systems/doctrine-encrypt" : "*", "elcweb/doctrine-encrypt-bundle" : "dev-master" } }
现在通过运行以下命令告诉composer下载该组件
$ php composer.phar update 51systems/doctrine-encrypt $ php composer.phar update elcweb/doctrine-encrypt-bundle
步骤 2: 启用组件
在kernel中启用组件
<?php // config/bundles.php return [ // ... Elcweb\DoctrineEncryptBundle\ElcwebDoctrineEncryptBundle::class => ['all' => true], ];
步骤 3: 设置密钥
# config/packages/doctrine_encryption.yaml elcweb_doctrine_encrypt: secret_key: SOME_STRING
许可证
此组件采用MIT许可证。请参阅组件中的完整许可证。
Resources/meta/LICENSE