tags:

views:

2211

answers:

4

Hi,

i am using VS 2005 C# i want to encrypt and decrypt the complete file using OPEN SSL, can anyone help me in this regard.....

A: 

SSL stands for Secure Socket Layer. It has nothing to do with encrypting files, but rather with secure (encrypted) TCP/IP connections. OpenSSL is an open source implementation, but you wouldn't need it on a Windows .NET platform.

Take a look at the System.Security.Cryptography namespace for implementations of some common cyphers that you can use to encrypt your file. AES (symmetric algorithm) and RSA (public key encryption) are both there and widely accepted.

Thorarin
+4  A: 

Er... I think you misunderstand what OpenSSL is.

OpenSSL implements the Secure Socket Layer protocol for securely transporting data between a client and server via TCP/IP.

You should have a look at the classes offered by the System.Security.Cryptography namespace, even MSDN has a basic tutorial on encrypting files.

As per working on all platforms, I believe that most, if not all, of the System.Security.Cryptography namespace works on Mono.

MiffTheFox
+2  A: 

Just for clarification you can do encryption and decryption using libcrypto which is a part of OpenSSL. But it will be unnecessary and tedius to use OpenSSL library from C#.NET. As suggested by MiffTheFox, you should be able to do all cryptography stuff using System.Security.Cryptography namespace.

srnayak
+1 for not forgetting about the crypto tools that come with OpenSSL
mrduclaw
+2  A: 

OpenSSL Wrapper for .NET: http://openssl-net.sourceforge.net/

DJEXN