PHP code example of tzsk / crypt

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

    

tzsk / crypt example snippets


'providers' => [
    ...
    Tzsk\Crypt\Provider\CryptServiceProvider::class,
    ...
],

'aliases' => [
    ...
    'StrCrypt' => Tzsk\Crypt\Facade\StrCrypt::class,
    ...
],

use Tzsk\Crypt\Facade\StrCrypt;
bash
php artisan vendor:publish --tag=config
 php
$text = "Hello World!";

$encrypted = StrCrypt::encrypt($text);

$decrypted = StrCrypt::decrypt($encrypted);