PHP code example of aichenk / open-crypt

1. Go to this page and download the library: Download aichenk/open-crypt 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/ */

    

aichenk / open-crypt example snippets


$crypt = new Crypt();
$crypt->setKey('12345678');
//$crypt->setCipher('des-ecb');
//$crypt->setIv('fff');
$text = 'test1234';
$encryptText = $crypt->encrypt($text);
$decryptText = $crypt->decrypt($encryptText);