tuhin18003/simpler-php-encrypt-decrypt

Very handy and simpler PHP Encryption and Decryption

v1.0.0 2023-01-08 23:18 UTC

This package is auto-updated.

Last update: 2024-05-09 02:20:03 UTC


README

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