Location: PHPKode > scripts > EncDec > encdec/example.php
<?
/* 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";

?>
Return current item: EncDec