定制 blocktrail/cryptojs-aes-php 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

blocktrail/cryptojs-aes-php

最新稳定版本:v0.1.0

Composer 安装命令:

composer require blocktrail/cryptojs-aes-php

包简介

Small openssl_encrypt/decrypt wrapper to be compatible with CryptoJS.AES

README 文档

README

This is a tiny package to make it a little bit easier to encrypt and decrypt in a manner compatible with CryptoJS.

Crypto

  • Cypher: AES-256
  • Mode: cbc
  • Key Derivation: evpkdf (OpenSSL custom, MD5, 1 iteration)

Installation

You will need to be using Composer in your project. If you aren't using Composer yet, it's really simple! Here's how to install composer and this package:

# Install Composer
curl -sS https://getcomposer.org/installer | php

# Add the BlockTrail SDK as a dependency
php composer.phar require blocktrail/cryptojs-aes-php

Next, require Composer's autoloader, in your application, to automatically load required packages in your project:

require 'vendor/autoload.php';
use Blocktrail\CryptoJSAES\CryptoJSAES;

Or if put the following in your composer.json:

"blocktrail/cryptojs-aes-php": "~0.1.0"

Usage

use Blocktrail\CryptoJSAES\CryptoJSAES;

$passphrase = "my passphrase";
$text = "example value";

$encrypted = CryptoJSAES::encrypt($text, $passphrase);
var_dump("Encrypted: ", $encrypted);

$decrypted = CryptoJSAES::decrypt($encrypted, $passphrase);
var_dump("Decrypted: ", $decrypted);

统计信息

  • 总下载量: 466.3k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 46
  • 点击次数: 1
  • 依赖项目数: 13
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-08-07