PHP code example of raph6 / enkryptor

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

    

raph6 / enkryptor example snippets


use raph6\Enkryptor\Enkryptor;

# encryption
$encrypted = Enkryptor::encrypt('string to encrypt', 'password');
var_dump($encrypted);

# decryption
$decrypted = Enkryptor::decrypt($encrypted, 'password');
var_dump($decrypted);

$encrypted = Enkryptor::encrypt('test', 'password', 'des-ede3-cfb1');
var_dump($encrypted);

$decrypted = Enkryptor::decrypt($encrypted, 'password', 'des-ede3-cfb1');
var_dump($decrypted);

var_dump(Enkryptor::cipherList());