You are here: MCRYPT blank « All PHP « IT news, forums, messages
MCRYPT blank

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация