How to encrypt zip file using zip4j

后端 未结 2 1649
伪装坚强ぢ
伪装坚强ぢ 2020-12-20 16:18

I want to create password protected ZIP:

    // Set the compression level
    parameters.setCompressionLevel(Zip4jConstants.DEFLATE_LEVEL_NORMAL);

    // Se         


        
2条回答
  •  猫巷女王i
    2020-12-20 16:34

    Zip4j does not support the encryption of the file list because of patent issues.

    See: http://www.lingala.net/zip4j/forum/index.php?topic=104.0

    Update:

    As stated in the link. The zip-specification does not include the encryption of the filelist. To hide the filenames you can create a zip-file including your files encapsulate it by zip it again. Hence if you open zip2.zip you will only see "zip1.zip" and not the original filenames.

提交回复
热议问题