Skip to content

Ownheader#4

Merged
yeka merged 3 commits into
yeka:masterfrom
davrux:ownheader
Nov 16, 2023
Merged

Ownheader#4
yeka merged 3 commits into
yeka:masterfrom
davrux:ownheader

Conversation

@davrux
Copy link
Copy Markdown

@davrux davrux commented Jun 11, 2018

Exports SetEncryptionMethod.
Using own headers may be useful when using UTF-8 file names:

fh := &zip.FileHeader{
        Name:   "test öäü.jpg",
        Method: zip.Deflate,
        Flags:  0x800,
}
fh.SetPassword("test")
fh.SetEncryptionMethod(zip.AES256Encryption)
w, err := z.w.CreateHeader(fh)
if err != nil {
        panic(err)
}
.....

davrux added 2 commits June 11, 2018 15:57
f.FileInfo().Name is a func value, not called
Allows creation of own header. For example UTF-8 file names by setting
bit 11 on header.
@mei-rune
Copy link
Copy Markdown

any progress?

@twbryan
Copy link
Copy Markdown

twbryan commented Sep 20, 2019

Please apply this patch! I also ran into this issue (wanting to set file modtime on an encrypted file header)

@yeka yeka merged commit 03d6312 into yeka:master Nov 16, 2023
KirCute pushed a commit to KirCute/zip that referenced this pull request Nov 9, 2025
Adding MIT license information to the project
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants