login about faq

Firstly I create a zip file, myzip:

CkZip objZip; objZip.UnlockComponent("some**code"); objZip.NewZip(myzip);

And put several files into it:

objZip.Appendfiles(file1, true); objZip.Appendfiles(file2, true); ...

Then put a password:

objZip.SetPassword(password); ...

So I get a zip file myzip. What I expected is that I need the password to open myzip. But now the thing is, the password is set on each file inside the zip, not the zip itself.

My question is how to add a password to the created zip file instead of each files inside the zip file?

Thanks very much for anybody who gives a clue!

asked Jan 07 '15 at 02:37

Veda's gravatar image


Encrypting each file is the new secure way to do it. What it sounds like you are looking for is the old (it's not secure be aware) way. You use the PasswordProtect method for that.

public bool PasswordProtect {get; set; }
true if the Zip should be password-protected using older Zip 2.0 encryption, commonly referred to as "password-protection".

answered Jan 07 '15 at 14:52

ColdFireDragon's gravatar image


Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Jan 07 '15 at 02:37

Seen: 1,532 times

Last updated: Jan 07 '15 at 14:52

powered by OSQA