ariffazmi/secure-encrypt

Simple secure asymmetric encryption for php

1.0 2017-05-09 04:34 UTC

This package is not auto-updated.

Last update: 2024-05-12 00:01:49 UTC


README

Install the Application

Composer

Run composer require ariffazmi/secure-encrypt

How To Use

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

use Secure\Encrypt;

function myhash(){

   return (new Encrypt());
}

//Encrypt
$encrypt_data = myhash()->encrypt("your data","mysecretkey");
$decrypt_data = myhash()->decrypt($encrypt,"mysecretkey");

//Encrypt (return value with base64)
$encrypt_data = myhash()->encrypt("your data","mysecretkey",true);
$decrypt_data = myhash()->decrypt($encrypt,"mysecretkey",true);

Or

You can skip the above by doing this:

composer create-project ariffazmi/secure-encrypt

After successfull install, run this command : composer make-example. You will have example.php file in your project directory.