Skip to content

Commit

Permalink
修复加密过滤问题
Browse files Browse the repository at this point in the history
  • Loading branch information
core-lib committed Jul 26, 2019
1 parent 5f1be8c commit 5611c06
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.xjar</groupId>
<artifactId>xjar</artifactId>
<version>v3.0.0-demo-build-2</version>
<version>v3.0.0-demo-build-3</version>

<name>xjar</name>

Expand Down
6 changes: 5 additions & 1 deletion src/main/java/io/xjar/boot/XBootDecryptor.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ public void decrypt(XKey key, InputStream in, OutputStream out) throws IOExcepti
zos.setLevel(level);
XUnclosedInputStream nis = new XUnclosedInputStream(zis);
XUnclosedOutputStream nos = new XUnclosedOutputStream(zos);
XJarDecryptor xJarDecryptor = new XJarDecryptor(xDecryptor, filter, level);
XJarDecryptor xJarDecryptor = XJarDecryptor.builder()
.decryptor(xDecryptor)
.filter(filter)
.level(level)
.build();
JarArchiveEntry entry;
while ((entry = zis.getNextJarEntry()) != null) {
if (entry.getName().startsWith(XJAR_SRC_DIR)
Expand Down
9 changes: 8 additions & 1 deletion src/main/java/io/xjar/boot/XBootEncryptor.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,14 @@ public void encrypt(XKey key, InputStream in, OutputStream out) throws IOExcepti
zos.setLevel(level);
XUnclosedInputStream nis = new XUnclosedInputStream(zis);
XUnclosedOutputStream nos = new XUnclosedOutputStream(zos);
XJarEncryptor xJarEncryptor = XJarEncryptor.builder().build();
XJarEncryptor xJarEncryptor = XJarEncryptor.builder()
.encryptor(xEncryptor)
.filter(filter)
.level(level)
.digestFactory(digestFactory)
.digestAlgorithm(digestAlgorithm)
.compiler(compiler)
.build();
JarArchiveEntry entry;
Manifest manifest = null;
while ((entry = zis.getNextJarEntry()) != null) {
Expand Down

0 comments on commit 5611c06

Please sign in to comment.