Thanks for the answer.
I would like to clarify – I want to do the above while I have the password.
What I did:
…
var inZip = new ZipArchive(fileStream) { DefaultEncryptionPassword = password, DefaultDecryptionPassword = password };
…
inZip.CopyFilesTo(outFolder, true, true);
…
var localheader = new ZipItemLocalHeader() { EncryptionPassword = null };
zipWriter.WriteItemLocalHeader(localHeader);
zipWriter.WriteItemData(fileStream, buffer, 0, buffer.Length);
Is this what you meant?