Skip to content

Create a password protected zip #16

Description

@XPOL555

The ->setPassword() method is not setting the password for the archive you are making; it's just setting the password to use to extract files when reading a zip archive.

As noted in this comment https://www.php.net/manual/en/ziparchive.setpassword.php#122465 the correct way to create a password protected zip file is to use ->setEncryptionName('test.txt', ZipArchive::EM_AES_256, 'passw0rd'); on each file entry.

This is currently not possible on Madzipper because the repository is not giving public access to the ZipArchive instance.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions