Hi, I discoved a method (EncryptionAlgorithm) in the class ZipConstants.cs, namespace ICSharpCode.SharpZipLib.Zip
I want to encrypt the compressed files in the zip archive when they went though the methods (CreateArchiveZip --> CompressZipFile) for compression, and I decided to use the method (EncryptionAlgorithm) for my encryption.
Currently, this is what I found out on creating the object for EncryptionAlgorithm:
ICSharpCode.SharpZipLib.Zip.EncryptionAlgorithm options = ICSharpCode.SharpZipLib.Zip.EncryptionAlgorithm.Aes256;
But I do not know how to use it...
*Note: I also saw this line of code in the method (CompressZipFile):
- newEntry.AESKeySize = 256;
However, I received an error on the AESKeySize (being underline as shown above).
Error Message: 'ICSharpCode.SharpZipLib.Zip.ZipEntry' does not contain a definition for 'AESKeySize' accepting a first argument of type 'ICSharpCode.SharpZipLib.Zip.ZipEntry' cound be found (are you missing a using directive or an assembly reference?)
Assuming I'm using:
1) Microsoft Visual Studio 2010
2) C# .NET 4.0 Framework
3) Microsoft Windows XP Professional Operating System
4) ICSharpCode.SharpZipLib.dll (0.86.0.518) Library Reference
Can anyone help me out and guide me along regarding the encryption using SharpZipLib?
Many Thanks! :)
Best Regards,
MrMaMaLuLu