![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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? |
#3
| |||
| |||
|
|
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? That should be fine, yes. |
#4
| |||
| |||
|
|
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? That should be fine, yes. Thank you for your replay! But my goal is to decrypt these code in java. The java lib had provide some classes for decription, but I can set the key parameter only, the IV parameter is readonly and it's default value is null! |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |