tebru/doctrine-encryption-bundle

为 Doctrine 实体添加加密类型

v0.2.0 2015-07-18 00:08 UTC

This package is auto-updated.

Last update: 2024-09-24 11:16:16 UTC


README

利用 tebru/aes-encryption 并添加一个 Doctrine 类型,该类型可以自动在数据库中加密和解密值。

安装

composer require tebru/doctrine-encryption-bundle

添加到 AppKernel

new Tebru\DoctrineEncryptionBundle\DoctrineEncryptionBundle(),

用法

在实体属性上设置列注释类型为 encrypted

@ORM\Column(type="encrypted")