Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Rafael M. Salvioni  >  RC4 Cipher  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Class example
Class: RC4 Cipher
Encrypt and decrypt data with RC4 algorithm
Author: By
Last change:
Date: 2008-11-10 03:21
Size: 303 bytes
 

Contents

Class file image Download
<?php

include('RC4.php');

$string "I am a secret text";
$key    "crypt_key";

$crypt  RC4::encrypt($key$string);
$dcrypt RC4::decrypt($key$crypt);

echo 
"
String: 
$string
Key: 
$key

Encripted Data: 
$crypt;

Success: " 
. ($string == $dcrypt 'true' 'false') . "
"
;

?>