srikanth-lingala / zip4j

A Java library for zip files and streams
Apache License 2.0
2.01k stars 307 forks source link

An option to ignore crc errors #472

Closed iamyou closed 1 year ago

srikanth-lingala commented 1 year ago

I am wondering why would you need that? A file extracted without a valid crc is a corrupt and invalid file. You might as well have create a file with random bytes in it. I am trying to understand a use case behind it.

iamyou commented 1 year ago

I wrote a java application and I dont want someone else to extract the data pack of mine,so I deliberately broken the crc of it,I will verify my data in an other way.But when I tried to extract the pack i found that zip4j hasnt a option to ignore crc errors.I done it with a custom patch on it.

srikanth-lingala commented 1 year ago

Why don't you set a password to the zip file if you wan't no one to be able to extract the file?

iamyou commented 1 year ago

It is a traditional way,there are many ways to brute force attack on it.But you are right,i can encrypt my data instead of encrypt the zip file.

srikanth-lingala commented 1 year ago

there are many ways to brute force attack on it.

AES encryption has significantly greater security and protection than the traditional zip encryption (ZIP_STANDARD in zip4j).