pgolasz/kohana-encrypt 问题修复 & 功能扩展

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

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

pgolasz/kohana-encrypt

Composer 安装命令:

composer require pgolasz/kohana-encrypt

包简介

Encryption module for Kohana 3.3. Uses Encrypt-then-MAC scheme with OPENSSL (AES) and Encrypt-then-Sign (RSA).

README 文档

README

Encryption module for Kohana 3.3. Port of Laravel Encrypt-then-MAC scheme for encrypting using OPENSSL (AES and RSA). Uses AES-256-CBC and AES-128-CBC, and user public and private keys with RSA.

Installation

$ cd modules
$ git clone [git-repo-url]

Add this line to Kohana::modules in your bootstrap.php:

'kohana-encrypt' => MODPATH . 'kohana-encrypt'

Install phpseclib using composer

$ composer install

Include autoload.php in your bootstrap.php

/**
 * Enable composer autoload libraries
 */
require APPPATH . '../vendor/autoload.php';

Generate AES and RSA keys for your application

$ php index.php --uri=task/encyptkeys

It's also possible to generate config inside common module of your application For example if your core classes are located in /modules/custommodule/classes, then config will be generated in /modules/custom/config

$ php index.php --uri=task/encyptkeys --module=custommodule

Usage

  • OPENSSL (AES-256-CBC or AES-128-CBC)
$encrypt = Encrypt::instance();
echo $encrypt->encrypt('This is my secret');
  • RSA
$encrypt = Encrypt::instance('secondary');
echo $encrypt->encrypt('This is my secret');

License

MIT

Free Software, Hell Yeah!

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2016-08-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固