Many thanks, Mike --- yours works great... 0 errors. On Jan 16, 2008, at 9:24 AM, mike wrote:
function data_encrypt($data) { if(!$data) { return false; } return base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $GLOBALS['config']['salt'], $data, 'cbc', md5($GLOBALS['config'][' salt'].$GLOBALS['config']['salt']))); } function data_decrypt($data) { if(!$data) { return false; } return rtrim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $GLOBALS['config']['salt'], base64_decode(str_replace(' ', '+', $data)), ' cbc', md5($GLOBALS['config']['salt'].$GLOBALS['config']['salt']))); }
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php