Your IP : 216.73.216.40


Current Path : /var/www/html/mmishra/iws8/html/ipay/
Upload File :
Current File : /var/www/html/mmishra/iws8/html/ipay/z.php

<?php
//$encdata = trim(base64_encode(mcrypt_encrypt($this->cipher, $this->key, $this->data, $this->mode, $this->getIV())));

$key = '0x0123456789ABCD';
$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);

//string values
$string = "merchantCode=IOBIITA&transactionId=${udf1}_$udf5&rollno=$udf1&Name=&mobileNo=$udf3&email=$udf2&year=".date("Y")."&Semester=$udf5&amount=$udf4&narration=fees&txnDate=".date("Ymd")."&payMode=IOBNET&RU=https://ipay.iiita.ac.in/iob/net/StatusTRAN.php";

//calculate checksum
$checksum = md5($string);

//parameter values
$param = "$string&checkSum=$checksum";

//encryption
$ciphertext = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $param, MCRYPT_MODE_CBC, $iv);
$ciphertext = $iv . $ciphertext;
$ciphertext_base64 = base64_encode($ciphertext);

$encdata = base64_decode($ciphertext_base64);


echo "=================================\n";
echo $encdata ."\n";
echo "=================================\n";

exit;
# --- DECRYPTION ---    

$ciphertext_dec = base64_decode($encdata);

# retrieves the IV, iv_size should be created using mcrypt_get_iv_size()
$iv_dec = substr($ciphertext_dec, 0, $iv_size);
    
# retrieves the cipher text (everything except the $iv_size in the front)
$ciphertext_dec = substr($ciphertext_dec, $iv_size);

# may remove 00h valued characters from end of plain text
$string = mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $key, $ciphertext_dec, MCRYPT_MODE_CBC, $iv_dec);
    
echo "=================================\n";
echo  $string . "\n";
echo "=================================\n";
?>