Excrypted password

I am using a text field to pass the password into my zip file. When I try to unzip them it tells me that I have the wrong password. Event though I can see the password on my screen of what I used. Below is the code I am using for the command:
strPassword is a string that is taking the text and placing it into the variable.

archivesettings = New ArchiveEntrySettings(CompressionSettings.Deflate, New TraditionalEncryptionSettings(strPassword))

@jboden

It would be great if you please attach the following resources here for testing:

  • Your input document.
  • Please attach the output ZIP that shows the undesired behavior.
  • Please create a standalone console application ( source code without compilation errors ) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip and upload them.

My input document is being created on the fly. Meaning it is coming out of a database and creating a comma delimited file. I can not supply this due to the sensitive nature of the document. I can supply the program and it can be modified to bypass this if that is what you want. But the issue is that when I supply the information for the password in a text field, that password is not being used during the encryption process. I am not sure what password is being used.

@jboden

Please manually create sample test file and share it here for testing along with simplified code example. We will investigate the issue and provide you more information on it.

I got it working late Friday afternoon. Had to pull the encryption settings out as a variable and use it that way.

@jboden

It is nice to hear from you that your problem has been solved. Please let us know if you have any more queries.

@jboden

We suggest you please use AES encryption if you are using ZipCrypto because ZipCrypto method considered as obsolete and insecure nowadays.