zqhong/encrypter

A powerful encrypter library based on illuminate/encryption
258
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

erirk/paypalpayment

laravel-paypalpayment is simple package help you process direct credit card paym...

0
gabrieloliverio/laravel5-generators

Database metadata-based generators for Laravel 5

1
doctrine/dbal

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

617,346,630 9,703
laravel/framework

The Laravel Framework.

561,395,438 34,860
laravel/tinker

Powerful REPL for the Laravel framework.

471,804,685 7,440