ywh/doctrine-encryption-bundle

ywh/doctrine-encryption-extension 与 Symfony2 的集成

安装数: 4,517

依赖项: 0

建议者: 0

安全: 0

星标: 2

关注者: 3

分支: 1

开放问题: 0

类型:symfony-bundle

1.0 2018-01-13 23:29 UTC

This package is not auto-updated.

Last update: 2024-09-24 04:40:31 UTC


README

此包为您的 Symfony2 项目提供了 DoctrineEncryptaionExtension 的集成。

许可证: MIT

安装

步骤 1: 下载包

打开命令行,进入您的项目目录,并执行以下命令以下载此包的最新稳定版本

    $ composer require ywh/doctrine-encryption-bundle

此命令要求您已全局安装 Composer,请参阅 Composer 文档中的 安装章节

步骤 2: 启用包

当使用 Flex 时,此步骤将自动处理。

然后,通过在您的项目的 app/AppKernel.php 文件中添加以下行来启用包

    // app/AppKernel.php

    class AppKernel extends Kernel
    {
        public function registerBundles()
        {
            $bundles = array(
                // ...

                new YWH\DoctrineEncryptionBundle\YWHDoctrineEncryptionBundle(),
            );

            // ...
        }

        // ...
    }

步骤 3: 配置包

# app/config/config.yml
ywh_doctrine_encryption:
    orm: ['default']
    password: password
    key: ... # defuse_key

要生成密钥,请使用位于 vendor/bin/generate-defuse-key 的 generate-defuse-key 脚本。

$ vendor/bin/generate-defuse-key