承接 egsys-dev/doctrine-encrypt 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

egsys-dev/doctrine-encrypt

Composer 安装命令:

composer require egsys-dev/doctrine-encrypt

包简介

Package encrypts and decrypts Doctrine fields through life cycle events.

README 文档

README

Este repositório foi baseado em:

https://github.com/nepda/doctrine-encrypt

Package encrypts and decrypts Doctrine fields through life cycle events. This version of the Doctrine Encrypt package distinguishes itself with the following features:

  • Superior Annotation parsing & caching using Doctrine's built in libraries for superior performance
  • Totally transparent field encryption: the value will only be encrypted in the database, never in the value
  • Unit testing

Tests

Tests currently run with PHP 7.1, 7.2

Instalação

Adicionar no compose.json:

"repositories": [
        {
            "type": "vcs",
            "url":  "git@github.com:egsys-dev/doctrine-encrypt.git"
        }
]
composer require egsys-dev/doctrine-encrypt:dev-master

Manually

Add the event subscriber to your entity manager's event manager. Assuming $em is your configured entity manager:

<?php

$subscriber = new DoctrineEncryptSubscriber(
    new \Doctrine\Common\Annotations\AnnotationReader,
    new \DoctrineEncrypt\Encryptors\OpenSslEncryptor("contentPrivateKeyRSA2048Generated", "contentPublicKey2048Generated", "passwordKeyRsa", "ivBase64")
);

$eventManager = $em->getEventManager();
$eventManager->addEventSubscriber($encrypt_subscriber);

Usage

<?php

namespace Your\CoolNamespace;

use Doctrine\ORM\Mapping as ORM;

use DoctrineEncrypt\Configuration\Encrypted;

/**
 * @ORM\Entity
 */
class Entity
{
    /**
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     * @ORM\Column(type="integer")
     * @var int
     */
    protected $id;

    /**
     * @ORM\Column(type="text")
     * @Encrypted
     * @var string
     */
    protected $secret_data;
}

License

This bundle is under the MIT license. See the complete license in the bundle

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-09-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固