<HTML>
<HEAD>
<TITLE>Posnet Encryption Test</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
</HEAD>
<?php
    //Include POSNET Enc Class
    require_once('../Posnet_Modules/Posnet_ENC/posnet_enc.php');
   
    $data = "D76E66758469942A72AA02EDBD9876745C93745C4971533187A45B4566DB22B5F9DF3D0051E420BDC39DE2B0569B5A575DCBF0448AB738EE16DCE45AC9A9B3FB02BE55F28407ECDEC7716F538337765784FDCF4CB1EEEADC863C7781E121BBFC11303CA7F94B20553423A85D1ED7AAA5114C7A5B18C24EB16DF428537ED292F44AD5299BC1C93CBDB33DA5A8ECC4C26694591832BA1E1799A7DDA7D1";
	$result = "";
     
    echo  "test";
    $posnetENC = new PosnetENC();
    $encryptedData = $posnetENC->Encrypt($data, "abc");
    $decryptedData = $posnetENC->Decrypt($encryptedData, "abc");
    
    if(strcmp($data, $decryptedData) == 0)
        $result = "Encryption/Decryption is OK.";
    else
        $result = "Encryption/Decryption error !!!!";
    $posnetENC->DeInit();
?>
<BODY>
<P><FONT COLOR="#0000FF" SIZE="5">Encryption/Decryption Test :</FONT></P>
<P><EM><STRONG>Encrypted Data :</STRONG> </EM> <? echo($encryptedData); ?> </P>
<P><EM><STRONG>Decrypted Data :</STRONG> </EM> <? echo($decryptedData); ?> </P>
<P><EM><STRONG>Result :</STRONG> </EM> <? echo($result); ?> </P>
</BODY>
</HTML>
