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 Al Rankin  >  EncDec  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example file
Class: EncDec
Encryption and decryption of strings of data
Author: By
Last change: changed hash line
Date: 2003-11-04 14:22
Size: 534 bytes
 

Contents

Class file image Download
<?
/* include the class */
include "encdec.class.php";

/* this is our sample password */
$word_in "password";

/* create a new instance of EncDec */
$test = &New EncDec;

/* a hash to do our XOR against */
//$test->hash = "aTestHash";  // change to whatever
$test->hash "veryLongAndWindingHash";


$test_out $test->phpEncrypt($word_in);
$test_out2 $test->phpDecrypt($test->phpEncrypt($word_in));

echo 
"Encryption of $word_in$test_out";
echo 
"<br><br>";
echo 
"Decryption of $test_out$test_out2";

?>