PHP code example of bugcat / shortcrypt

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

    

bugcat / shortcrypt example snippets


use Bugcat\ShortCrypt\NumberCrypter;

$nums = [54321, 9999, 2019];
$encrypted = NumberCrypter::encrypt($nums, 16);
var_dump($encrypted);
//string(16) "ln0l7pru15wxm1k3"

$decrypted = NumberCrypter::decrypt($encrypted);
var_dump($decrypted);
//array(3) { [0]=> string(5) "54321" [1]=> string(4) "9999" [2]=> string(4) "2019" }