PHP code example of felixdorn / php-rc4

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

    

felixdorn / php-rc4 example snippets


$encrypted = \Felix\RC4\RC4::rc4('key', 'data')
$decrypted = \Felix\RC4\RC4::rc4('key', $encrypted);

\Felix\RC4\RC4::fake(function ($key, $data) {
    // Fake it if you need to for some reason.
});

rc4('key', 'data'); // calls RC4::rc4

// Or, to be semantic:
$encrypted = rc4_encrypt('key', 'data');
$decrypted = rc4_decrypt('key', 'data');
// But both call rc4() under the hood
bash
composer