Write CRC for Standard Zip Encryption

This commit is contained in:
yeka committed 2018-02-23 12:14:14 +07:00
1 parent 673b7b98d0
commit f2052480f0
2 files changed
+1 -2

No files matched your search

+1 -1
View File
@@ -332,7 +332,7 @@ func (w *fileWriter) close() error {
// update FileHeader
fh := w.header.FileHeader
// ae-2 we don't write out CRC
if !fh.IsEncrypted() {
if !fh.IsEncrypted() || fh.encryption == ZipStandardEncryption {
fh.CRC32 = w.crc32.Sum32()
}
fh.CompressedSize64 = uint64(w.compCount.count)