dterranova/crypto-bundle 问题修复 & 功能扩展

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

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

dterranova/crypto-bundle

Composer 安装命令:

composer require dterranova/crypto-bundle

包简介

dterranovaCryptoBundle

README 文档

README

This bundle provide file encryption with AES-256 Cipher The amount of memory used is independant of the file you encrypt.

Workflow

Encryption

The original file is read by the chunk_file_size and the encryption is done on this amount of data A folder is created in the temp_folder with the name of the original encrypted file Each encrypted part are written in this folder

Decryption

By passing the original file name to the decryptFile method, the cryptoBundle use the corresponding folder with encrypted parts of the file to rebuild the original file

Installation

  • Add to your composer file
{
    "require": {
        ...
        "dterranova/crypto-bundle": "dev-master"
    }
    ...
}
  • Update your vendors php composer.phar update

  • Add to your AppKernel

    // app/AppKernel.php
    public function registerBundles()
    {
        return array(
            // ...
            new dterranova\Bundle\CryptoBundle\dterranovaCryptoBundle(),
            // ...
        );
    }
  • Add to your app/config/config.yml
# app/config/config.yml
dterranova_crypto:
    temp_folder: "%kernel.root_dir%/../web/YOUR_TEMP_FOLDER"
    chunk_file_size: 2 # The size (in Mb) of chunked files, more it is big more it will consume memory 

Usage

  • Encrypt a file
$cryto = $this->get("dterranova_crypto.crypto_adapter");
$crypto->encryptFile(ABSOLUTE_FILE_PATH, KEY);
  • Decrypt a file
$cryto = $this->get("dterranova_crypto.crypto_adapter");
$crypto->decryptFile(ABSOLUTE_FILE_PATH, KEY, true);  // The same absolute file path

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2012-12-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固