throw new ZipException("only AES encrypted files are supported"); int cryptoHeaderOffset = zipEntry.getOffset() - cde.getCryptoHeaderLength(); byte[] salt = raFile.readByteArray(cryptoHeaderOffset, 16); byte[] pwVerification = raFile.readByteArray(cryptoHeaderOffset + 16, 2); if (LOG.isLoggable(Level.FINEST)) { LOG.finest("\n" + cde.toString()); LOG.finest("offset = " + zipEntry.getOffset()); LOG.finest("cryptoOff = " + cryptoHeaderOffset); LOG.finest("password = " + password + " - " + password.length());
throw new ZipException("only AES encrypted files are supported"); int cryptoHeaderOffset = zipEntry.getOffset() - cde.getCryptoHeaderLength(); byte[] salt = raFile.readByteArray(cryptoHeaderOffset, 16); byte[] pwVerification = raFile.readByteArray(cryptoHeaderOffset + 16, 2); if (LOG.isLoggable(Level.FINEST)) { LOG.finest("\n" + cde.toString()); LOG.finest("offset = " + zipEntry.getOffset()); LOG.finest("cryptoOff = " + cryptoHeaderOffset); LOG.finest("password = " + password + " - " + password.length());
protected void writeDirEntry(ExtZipEntry entry) throws IOException { writeInt(CENSIG); // writeBytes( new byte[] { 0x50, 0x4b, 0x01, 0x02 } // ); // directory signature writeShort(ZIP_VERSION); // version made by writeFileInfo(entry); writeShort(0x00); // file comment length 2 bytes writeShort(0x00); // disk number start (unused) 2 bytes writeShort(0x00); // internal file attributes (unsued) 2 bytes writeInt(0x00); // external file attributes (unused) 4 bytes writeInt(entry.getOffset()); // relative offset of local header 4 bytes writeBytes(entry.getName().getBytes("iso-8859-1")); writeExtraBytes(entry); }
protected void writeDirEntry(ExtZipEntry entry) throws IOException { writeInt(CENSIG); // writeBytes( new byte[] { 0x50, 0x4b, 0x01, 0x02 } // ); // directory signature writeShort(ZIP_VERSION); // version made by writeFileInfo(entry); writeShort(0x00); // file comment length 2 bytes writeShort(0x00); // disk number start (unused) 2 bytes writeShort(0x00); // internal file attributes (unsued) 2 bytes writeInt(0x00); // external file attributes (unused) 4 bytes writeInt(entry.getOffset()); // relative offset of local header 4 bytes writeBytes(entry.getName().getBytes("iso-8859-1")); writeExtraBytes(entry); }
throw new ZipException("only AES encrypted files are supported"); int cryptoHeaderOffset = zipEntry.getOffset() - cde.getCryptoHeaderLength(); byte[] salt = raFile.readByteArray(cryptoHeaderOffset, 16); byte[] pwVerification = raFile.readByteArray(cryptoHeaderOffset + 16, 2); if (LOG.isLoggable(Level.FINEST)) { LOG.finest("\n" + cde.toString()); LOG.finest("offset = " + zipEntry.getOffset()); LOG.finest("cryptoOff = " + cryptoHeaderOffset); LOG.finest("password = " + password + " - " + password.length());