My task is simple: I have a password protected zip file that I know its password. I just want to remove the password protection.
I know that using DotnetZip I could open the password protectez zip file and then copy the files to a new, unprotected, archive. But the challenge is that I would like to avoid duplicating the zipped file. So the password removal should be done "in place", against the same file because it's more efficient and I don't need the password protected file anymore.
From DotNetZip Library - how to remove a zip password?:
The password in a zipfile is used to encrypt the entry data. As a result, "removing a password" involves decrypting the entry data, and then rewriting the unencyrpted entry data back into a zip file. There is no other way around this "terrible thing".