PHP code example of onamanzi / mdcrypt

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

    

onamanzi / mdcrypt example snippets

shell
php artisan vendor:publish --provider="Onamanzi\Mdcrypt\MdcryptServiceProvider" --tag=mdcrypt-config

$arrayToEncrypt = array(
	"mensaje1" => "Soy una cadena de texto",
	"mensaje2" => "Soy otra cadena de texto"
);

$crypt->encrypt(json_encode($arrayToEncrypt));

$string = $crypt->getResult();

 $crypt->decrypt($string);

 $crypt->getResult("array");

$string = $crypt->getValidRequest();

$result = $crypt->getResult('array');
$rules = array(
	'mensaje1' => '