Skip to content

Commit 5611c06

Browse files
author
core-lib
committed
修复加密过滤问题
1 parent 5f1be8c commit 5611c06

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>io.xjar</groupId>
88
<artifactId>xjar</artifactId>
9-
<version>v3.0.0-demo-build-2</version>
9+
<version>v3.0.0-demo-build-3</version>
1010

1111
<name>xjar</name>
1212

src/main/java/io/xjar/boot/XBootDecryptor.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ public void decrypt(XKey key, InputStream in, OutputStream out) throws IOExcepti
3939
zos.setLevel(level);
4040
XUnclosedInputStream nis = new XUnclosedInputStream(zis);
4141
XUnclosedOutputStream nos = new XUnclosedOutputStream(zos);
42-
XJarDecryptor xJarDecryptor = new XJarDecryptor(xDecryptor, filter, level);
42+
XJarDecryptor xJarDecryptor = XJarDecryptor.builder()
43+
.decryptor(xDecryptor)
44+
.filter(filter)
45+
.level(level)
46+
.build();
4347
JarArchiveEntry entry;
4448
while ((entry = zis.getNextJarEntry()) != null) {
4549
if (entry.getName().startsWith(XJAR_SRC_DIR)

src/main/java/io/xjar/boot/XBootEncryptor.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,14 @@ public void encrypt(XKey key, InputStream in, OutputStream out) throws IOExcepti
6666
zos.setLevel(level);
6767
XUnclosedInputStream nis = new XUnclosedInputStream(zis);
6868
XUnclosedOutputStream nos = new XUnclosedOutputStream(zos);
69-
XJarEncryptor xJarEncryptor = XJarEncryptor.builder().build();
69+
XJarEncryptor xJarEncryptor = XJarEncryptor.builder()
70+
.encryptor(xEncryptor)
71+
.filter(filter)
72+
.level(level)
73+
.digestFactory(digestFactory)
74+
.digestAlgorithm(digestAlgorithm)
75+
.compiler(compiler)
76+
.build();
7077
JarArchiveEntry entry;
7178
Manifest manifest = null;
7279
while ((entry = zis.getNextJarEntry()) != null) {

0 commit comments

Comments
 (0)