Hi, 
   I am using libmcrypt-2.5.3 to do encryption in php.
I use exactly the steps provided in mcrypt_module_open
available on php website
http://php.benscom.com/manual/en/function.mcrypt-module-open.php

I can encrypt and decrypt a string correctly. However,
if i encrypt a cookie to write to user's browser, the
decryption is incorrect when i try to decrypt this
cookie when user comes again. I found out the main
cause is the function mcrypt_module_open. This
function return a different resource everytime it is
called. Eventually it cause the decryption on cookie
to be incorrect. Can someone give me suggestion on how
to encrypt and decrypt a cookie? 

Thanks very much.

Kim

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to