Current location: Hot Scripts Forums » Programming Languages » PHP » How to encrypt on Windows (C++) and decrypt in PHP?


How to encrypt on Windows (C++) and decrypt in PHP?

Reply
  #1 (permalink)  
Old 01-27-06, 02:15 AM
magmy magmy is offline
New Member
 
Join Date: Jan 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
How to encrypt on Windows (C++) and decrypt in PHP?

I need to encrypt some info, send it to my Apache server, and decrypt it there.

I want to use C++ under Windows to encrypt, and PHP on the server side to decrypt.

I am trying to encrypt using CryptEncrypt(...) on Windows, and mdecrypt_generic(...) in PHP. When I encrypt the same data using C++ and PHP, the result is different. How can I set the parameters so the results are the same on both platforms? (I arbitrarily use MD5 to go from a password to a key, and RC2 to do the encryption/decryption.)

Thanks to anyone who have solved this problem before, and wants to share their insight!

- Magne
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT -5. The time now is 06:29 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.