PHP code example of tebru / aes-encryption

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

    

tebru / aes-encryption example snippets




$encrypter = new AesEncrypter($key);
$encrypted = $encrypter->encrypt('My secure data');
$decrypted = $encrypter->decrypt($encrypted);

new AesEncrypter($key, AesEnum::METHOD_128);

new AesEncrypter($key, AesEnum::METHOD_256, AesEncrypter::STRATEGY_MCRYPT);