Skip to content

tuhin18003/simpler-php-encrypt-decrypt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simpler PHP Encrypt & Decrypt

Very handy and simpler PHP Encryption and Decryption

Install

Via Composer

$ composer require tuhin18003/simpler-php-encrypt-decrypt

Usage

Include the autoload file in your working file..

require './vendor/autoload.php';

Encryption

use Tuhin18003\SimPhpEnDecrypt\Builder

$encryption = Builder::encrypt('test');

Output

It returns an array with cipher and key

Array ( [cipher] => SWlPb2ZQN1ZDRlJXb2JwRXdOVmtmZz09 [key] => MTk2OGEyOTdlE0M2RkMjhkZGRlOTQxMTk= )

Decryption

use Tuhin18003\SimPhpEnDecrypt\Builder

Builder::decrypt( $encryption['cipher'], $encryption['key'] );

Output

It returns the original string

test

Credentials

codesolz.net

About

Very handy and simpler PHP Encryption and Decryption

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages