简体   繁体   中英

Creating encrypted Zip files that are compatible with the TrueZip Java Library (Winzip AES?)

Is try to create an encrypted ZIP file which is compatible with the TrueZIP java library.

I tried 7z

7za -tzip -mem=AES256 a out.myzip -pFoo in.file

but when decrypting in TrueZIP I get the exception:

W/System.err: de.schlichtherle.truezip.io.InputException:   
 java.util.zip.ZipException: in.file (encrypted compression method 8 
 is not supported)

It worked using

 7z -tzip -mm=Deflate -mem=AES256 a .... 

and

    @Override
    public AesKeyStrength getKeyStrength(String arg0)
            throws ZipKeyException {
        return AesKeyStrength.BITS_256;
    }

on the Java side.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM