Note that IVs only affect block cipher modes other than ECB mode. ECB mode
ignores IVs completely.
Titu Kim wrote:
> 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
> 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.
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php