W
wolf
Can I de-crypt the data by java which is crypt by DESCryptoServiceProvider?
The following is my code to crypt data:
string text = "This is My source data";
byte[] source = System.Text.Encoding.Unicode.GetBytes(text);
DESCryptoServiceProvider des = new DESCryptoServiceProvider();
des.Key = this.key;
des.IV = this.iv;
ICryptoTransform desencrypt = des.CreateEncryptor();
System.IO.MemoryStream ms = new System.IO.MemoryStream();
CryptoStream cryptostream = new
CryptoStream(ms,desencrypt,CryptoStreamMode.Write);
cryptostream.Write(source, 0, source.Length);
byte[] result = ms.ToArray();
cryptostream.Close();
ms.Close();
And then, I will send the release data(result) to other host via http
connection. And the remote host platform is java. Could the java platform
decrypt the data I sent to?
Thanks!
The following is my code to crypt data:
string text = "This is My source data";
byte[] source = System.Text.Encoding.Unicode.GetBytes(text);
DESCryptoServiceProvider des = new DESCryptoServiceProvider();
des.Key = this.key;
des.IV = this.iv;
ICryptoTransform desencrypt = des.CreateEncryptor();
System.IO.MemoryStream ms = new System.IO.MemoryStream();
CryptoStream cryptostream = new
CryptoStream(ms,desencrypt,CryptoStreamMode.Write);
cryptostream.Write(source, 0, source.Length);
byte[] result = ms.ToArray();
cryptostream.Close();
ms.Close();
And then, I will send the release data(result) to other host via http
connection. And the remote host platform is java. Could the java platform
decrypt the data I sent to?
Thanks!