AES Encrypting/Decrypting Large Files with Cryptography Block

Topics: Cryptography Application Block
May 7, 2010 at 5:05 PM

I have very large files that need to be encrypted and decrypted (i.e. > 2 Gigabytes).  I was thinking of usiing the Cryptography Block in Enterprise Library 5.0.  However, looking at the examples, the encryption/decryption uses a plain text string as input the the EncryptSymmetric/DecryptSymmetric methods.  I really don't want to load gigabytes of text into memory

Does anyone have any suggestion on how to encrypt/decrypt large files using the Enteprise Library?

Thanks.

May 11, 2010 at 8:27 AM
Edited May 11, 2010 at 8:28 AM

There's no out-of-the box implementation that will meet your requirement.  You will need to figure out the best/recommended approach for encrypting/decrypting large files. (I suggest asking this in other .NET forums.)  It's up to you then if you still want to do it the entlib way by creating your own implementation of ISymmetricCryptoProvider which holds the logic for the encryption.

 

Sarah Urmeneta
Global Technology & Solutions
Avanade, Inc.
entlib.support@Avanade.com