werty37 Posted June 7, 2006 Share Posted June 7, 2006 HiI need some help with this script[code]class securedata{var $key = "Four score and twenty years ago";$iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND);function encrypt($STR){return mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $STR, MCRYPT_MODE_CBC, $iv);}function decrypt($STR){return mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, $STR, MCRYPT_MODE_CBC, $iv);}}$sd = new securedata();$enc = $sd->encrypt('Message');echo bin2hex($enc);echo "<br>";echo $sd->decrypt($enc);?>[/code]When i execute it, i get this error:Parse error: syntax error, unexpected T_VARIABLE, expecting T_FUNCTION in /var/www/emites/securedata_inc.php on line 15Please helpThanks in advance Quote Link to comment https://forums.phpfreaks.com/topic/11376-rijindael-help/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.