|
Posted by yakuza on 10/11/64 11:53
hi,
i have the mcrypt below. when i encrypt and decrypt the data it works
fine but if i try to get any varibles after decrypting they are blank.
as you can se the ip at start of echo is ok but at end its blank.
session_start();
$msk = "7455676";
$ip=$_SERVER["REMOTE_ADDR"];
$data = "this is data";
$data = mcrypt_cbc(MCRYPT_BLOWFISH,$msk,$data
,MCRYPT_ENCRYPT,'56546828');
$_SESSION['mm']=base64_encode($data);
$decdata=$_SESSION['mm'];
$decdata=base64_decode($decdata);
$decdata =
mcrypt_cbc(MCRYPT_BLOWFISH,$msk,$decdata,MCRYPT_DECRYPT,'56546828');
echo $ip.$decdata.$ip;
cheers
yakuza
Navigation:
[Reply to this message]
|