hello. i have both a web gui written in C#, running on IIS server and C++ written engine, running on apache. i need my web gui to encrypt and the C++ engine to decrypt the data. what equivalent function can i use to achieve my purpose ?
A:
You could use MD% since it is built in to the .NET Framework to encript
System.Security.Cryptography.MD5CryptoServiceProvider x = new System.Security.Cryptography.MD5CryptoServiceProvider();
byte[] data = System.Text.Encoding.ASCII.GetBytes(Value);
data = x.ComputeHash(data);
return System.Text.Encoding.ASCII.GetString(data);
and then use an open-source component for C++ as described at http://userpages.umbc.edu/~mabzug1/cs/md5/md5.html
to decript. Good luck
Constantin
2010-08-10 08:39:30