Securing Data send by a C# program over http

Hey Guys,

I am sending a string over the http in my c# program.
It's not a browser based program.

I want to know hoe can i secure that string.

The I secure the website with SSL and then send the string with https, or that will not work because it's not from a browser?

Thanks
sonu19Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Phil_AgcaoiliConnect With a Mentor Commented:
For C#, use DPAPI for encrypt.
For Java, use javax.crypto and java.security.

Here are some samples for Java:
http://forum.java.sun.com/thread.jspa?threadID=734949&messageID=4227225
http://exampledepot.com/egs/javax.crypto/DesFile.html

The C# DPAPI samples are listed above.
0
 
Daniel ReynoldsConnect With a Mentor Software Applications Developer / IntegratorCommented:
Check this forum post. It will provide some insight.
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2674639&SiteID=1
0
 
Phil_AgcaoiliConnect With a Mentor Commented:
For data at rest (on your system), you use DPAPI to Encrypt and Decrypt Data. Here's more info: http://www.obviex.com/samples/dpapi.aspx

To encrypt data in motion, I also recommend you use HttpWebRequest for HTTPS requests as implemeting a HTTP stack using SSLStream class is not trivial.  This will save you many months of work.

Good luck.
0
 
sonu19Author Commented:
I want to decrypt data in java and encrypt in c#
0
All Courses

From novice to tech pro — start learning today.