Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to encrypt a .zip file?

Tags:

c#

zip

encryption

Is it possible to encrypt a Zip file? I know encryption is used to make .txt files unreadable until decrypted with a key. Although I want to do the same with a .zip file.
I have multiple files I want users to download from the internet through my program I'm creating, so I thought I'll compress them files in a .zip and then encrypt the Zip for added security. (I don't want users to access the file within the .zip without a serial code)
I was going to keep the 'serial key' in a database online which the program would get.

Am going about this in the wrong way?

like image 287
Joey Morani Avatar asked Jan 31 '11 12:01

Joey Morani


2 Answers

Both DotNetZip and SharpZipLib support encrypting the contents of zips and are free.

like image 90
Peter Taylor Avatar answered Nov 03 '22 00:11

Peter Taylor


Use the dotnetzip library to perform your zipping/unzipping operations.

It supports AES encryption. From the website:

The library supports zip passwords, Unicode, ZIP64, stream input and output, AES encryption, multiple compression levels, self-extracting archives, spanned archives, and more.

like image 34
yorah Avatar answered Nov 02 '22 23:11

yorah