PHP code example of luckystar / crypto

1. Go to this page and download the library: Download luckystar/crypto library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

luckystar / crypto example snippets



use \LuckyStar\Crypto\Crypto;

// Encrypt data

echo $crypto->setSecretIv('00cccskmmx55')
	->setSecretKey('00	cccxxx55')
	->encrypt('Hello, World!')->getOutput();

// Decrypt data

echo $crypto->decrypt('b0lSSVJzeTUwZ1p4WGpmNUY0Zk55NE9janZaZWM1VVhKUEdVUDBSZWh2WT0=')->getOutput();