8000 readme additional info on password protection · Issue #492 · zlib-ng/minizip-ng · GitHub
[go: up one dir, main page]

Skip to content

readme additional info on password protection #492

Closed

Description

@hsdk123

Hi, it's taken me a while to realise that

file_info.flag |= MZ_ZIP_FLAG_ENCRYPTED;
file_info.aes_version = MZ_AES_VERSION;

need to be set in order for password protection for entry writing to work properly.

I had misassumed that setting either mz_zip_writer_set_password, or writer_password_cb would be sufficient for entries to be written with password protection.

I think an addition to the docs somewhere on this (ex. for the above functions) would help any future mishap.

Activity

  1. hsdk123 commented on Jun 6, 2020

    @hsdk123
    Author

    It also seems as if just setting

    file_info.flag |= MZ_ZIP_FLAG_ENCRYPTED;
    

    and leaving aes_version blank creates an invalid archive. The code looks as if to be attempting pkware encryption, but this doesn't seem to be the case.

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

    documentationDocumentation updatefixedIssue or bug has been fixed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0