• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 451
  • Last Modified:

.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
0
BlearyEye
Asked:
BlearyEye
2 Solutions
 
JimBrandleyCommented:
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
 
PaulHewsCommented:
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

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now