NYCPHP Meetup

NYPHP.org

[nycphp-talk] MCrypt problems decrypting data

Sean sean712 at gmail.com
Fri Aug 17 17:52:50 EDT 2007


I am having issues with encryption/decryption.

I am attempting to encrypt an integer (61663)

when i decrypt it I get the following appended to my decrypted value.

61663\357\277\275\357\277\275\357\277\275

$td = mcrypt_module_open('blowfish', '', 'cbc, '');
 $iv = mcrypt_create_iv (mcrypt_enc_get_iv_size($td), MCRYPT_RAND);
    mcrypt_generic_init($td, $key, $iv);
    $decrypted_data = mdecrypt_generic($td, base64_decode($input));


BTW I base 64 encode the encypted integer(61663) and store it in a cookie

Any Help would be greatly appreciated

Thanks,

Sean
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20070817/72f25a11/attachment.html>


More information about the talk mailing list