.net encryption class for large files

disclaimer: I'm modestly familiar with .net and somewhat familiar with encryption. I'm working on a .net project that requires large-ish files (up to 5gb) to be encrypted. The encryption classes I've found so far either work in memory (and hence get out-of-memory exceptions) or come with license fees that would be awkward to deal with.

Is there any encryption class that's efficient with large files and is open-source or otherwise free?

Thanks, Bill
LVL 1
BlearyEyeAsked:
Who is Participating?
 
JimBrandleyConnect With a Mentor Commented:
The CryptoStream class will do what you need in C#. It takes a file path as input, and can write the output to a file. Here's an example that works bidirectionally with files, using the Rijndael algorithm.

http://msdn2.microsoft.com/en-us/library/system.security.cryptography.cryptostream.aspx

Jim
0
 
surajgupthaCommented:
Have you tried using DES, Rijndael.code samples??Symmentric keys are always good for encrypting large files
0
 
surajgupthaCommented:
Jim, Thats a cool thing. I was thinking about streams but didnt know there was a crypto stream
0
 
PaulHewsConnect With a Mentor Commented:
Here's an application that shows how to encrypt decrypt files using streams rather than reading the full thing into memory.

Encrypt/Decrypt Files in VB.NET (Using Rijndael)
http://www.codeproject.com/dotnet/EncryptFile.asp
0
 
BlearyEyeAuthor Commented:
Perfect, thanks. Bill
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.