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?

Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

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

Here are some samples for Java:

The C# DPAPI samples are listed above.
Daniel ReynoldsConnect With a Mentor Software Applications Developer / IntegratorCommented:
Check this forum post. It will provide some insight.
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:

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.
sonu19Author Commented:
I want to decrypt data in java and encrypt in c#
All Courses

From novice to tech pro — start learning today.