PHP code example of virge / enigma

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

    

virge / enigma example snippets


$inputFile = "./test.txt";

$outputFile = "./encrypted.txt";

$decryptedFile = "./decrypted.txt";

Enigma::encryptFile($inputFile, $outputFile, "secret");

Enigma::decryptFile($outputFile, $decryptedFile, "secret");

if(Enigma::md5File($inputFile) !== Enigma::md5File($decryptedFile)) {
    die("File hashes do not match");
}