zqhong/encrypter

A powerful encrypter library based on illuminate/encryption
265
Install
composer require zqhong/encrypter
Latest Version:v1.1
PHP:>=5.4.0
License:MIT
Last Updated:Apr 9, 2017
Links: GitHub  ·  Packagist
Maintainer: zqhong

Encrypter - A powerful encrypter library based on illuminate/encryption

The encryption algorithms that Encrypter supports:

  • AES-128-CFB
  • AES-192-CFB
  • AES-256-CFB
  • RC4
  • RC4-MD5

Simple

<?php

require __DIR__ . "/vendor/autoload.php";


use Zqhong\Encrypter\Encrypter;

$key = 'password';
$cipher = 'RC4-MD5';
$plainText = 'hello world';
$encrypter = new Encrypter($key, $cipher);

$payload = $encrypter->encryptString($plainText);
echo $payload . PHP_EOL;
echo $encrypter->decryptString($payload) . PHP_EOL;

// will output
//eyJpdiI6IiIsInZhbHVlIjoiMDIxR1dXcHg4K21yR2RBPSIsIm1hYyI6ImRhYzFjYWFjODg5ODA1MWFlMWE0OTZmYTNjMTlkYWIxNDExZjAzYzU2ZjlhM2FmMTY1ZWYwYjFkYTJiZjJkNjgifQ==
//hello world

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

644,549,754 9,698
laravel/framework

The Laravel Framework.

593,882,149 34,959
laravel/tinker

Powerful REPL for the Laravel framework.

507,193,856 7,441
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

423,477,751 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

399,241,428 4,660

Version History

Version Released PHP License
v1.1 >=5.4.0 MIT
v1.0 >=5.4.0 MIT