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

237 Views Asked by At

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)
1

There are 1 best solutions below

0
Alex On BEST ANSWER

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.