PHP code example of dandjo / simple-obfuscator

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

    

dandjo / simple-obfuscator example snippets


// create a new instance
$salt = 'my-security-by-obscurity';
$obfuscator = new \Dandjo\SimpleObfuscator\SimpleObfuscator($salt);

$encrypted = $obfuscator->encrypt('4711-foobar');  // $encrypted == "6f927ea5a49b7c"
$decrypted = $obfuscator->decrypt('6f927ea5a49b7c');  // $decrypted === "4711-foobar"