TheConeHead
Programmer
I am getting data encrypted fine using:
but I can not seem to get it decrypted. I get the following error:
Parse error: parse error, unexpected T_VARIABLE in ... on line 645
I have simply copied the code from php.net. Line 645 is in red
![[conehead] [conehead] [conehead]](/data/assets/smilies/conehead.gif)
Code:
$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB);
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
$key = "blah blah blah";
$text = $pword;
$crypttext = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $text, MCRYPT_MODE_ECB, $iv);
but I can not seem to get it decrypted. I get the following error:
Parse error: parse error, unexpected T_VARIABLE in ... on line 645
I have simply copied the code from php.net. Line 645 is in red
Code:
$EFquery = mysql_query("SELECT * FROM table where field = '$variable'");
$resultEF = mysql_fetch_array($EFquery);
[COLOR=#ff0000]$text = $resultEF[pword];[/color]
$key = "blah blah blah";
$iv_size = mcrypt_get_iv_size(MCRYPT_XTEA, MCRYPT_MODE_ECB);
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
$enc = mcrypt_encrypt(MCRYPT_XTEA, $key, $text, MCRYPT_MODE_ECB, $iv);
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
$key = "blah blah blah";
$text = $resultEF[pword];
$crypttext = mcrypt_decrypt(MCRYPT_XTEA, $key, $enc, MCRYPT_MODE_ECB, $iv);
![[conehead] [conehead] [conehead]](/data/assets/smilies/conehead.gif)