osw3/symfony-entity-encrypt 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

osw3/symfony-entity-encrypt

最新稳定版本:0.0.5

Composer 安装命令:

composer require osw3/symfony-entity-encrypt

包简介

Encrypt & Decrypt entity data in database.

README 文档

README

Encrypt & Decrypt entity data in database

How to install

Step 1: Download the Bundle

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

composer require osw3/symfony-entity-encrypt

Step 2: Enable the Bundle

Then, enable the bundle by adding it to the list of registered bundles in the config/bundles.php file of your project:

// config/bundles.php

return [
    // ...
    OSW3\EntityEncrypt\EntityEncryptBundle::class => ['all' => true],
];

How to use

Step 1: Edit the configuration

Edit the configuration file config/packages/entity_encrypt.yaml

entity_encrypt:
    algo: aes256

Step 2: Add Encrypted attribute to your entities

use OSW3\EntityEncrypt\Attribute\Encrypted;

class Message
{
    // ...

    #[ORM\Column(type: Types::TEXT)]
    #[Encrypted] // Just add this Attribute
    #[Encrypted(salt: 'my-salt')] // or add this Attribute with salt
    private ?string $secret = null;

    // ...
}

统计信息

  • 总下载量: 6
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-09-17