2017 © Pedro Peláez
 

library cryptojs-aes-php

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

image

blocktrail/cryptojs-aes-php

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

  • Friday, August 7, 2015
  • by blocktrail
  • Repository
  • 2 Watchers
  • 14 Stars
  • 26,495 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 6 Forks
  • 0 Open issues
  • 2 Versions
  • 16 % Grown

The README.md

CryptoJS AES PHP

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

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:, (*2)

# 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:, (*3)

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

Or if put the following in your composer.json:, (*4)

"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);

The Versions

07/08 2015

dev-master

9999999-dev

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

  Sources   Download

MIT

The Development Requires

07/08 2015

v0.1.0

0.1.0.0

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

  Sources   Download

MIT

The Development Requires