Skip to content

Commit

Permalink
Refactored build to target to java 6 for max compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
souramoo committed May 7, 2020
1 parent 34888e6 commit 191c446
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 9 deletions.
4 changes: 3 additions & 1 deletion .idea/artifacts/UnApkm_main_jar.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins {
id 'java'
}

group 'org.example'
group 'com.souramoo.unapkm'
version '1.0-SNAPSHOT'

sourceCompatibility = 1.8
Expand Down
5 changes: 3 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#Thu May 07 16:13:12 BST 2020
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
9 changes: 5 additions & 4 deletions src/main/java/com/souramoo/unapkm/UnApkm.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,14 @@ public static InputStream decryptStream(InputStream i, Header h) throws IOExcept
return decryptStream(i, h, lazySodium);
}

public static InputStream decryptStream(InputStream i, Header h, LazySodiumJava lazySodium) throws IOException {
public static InputStream decryptStream(final InputStream i, final Header h, final LazySodiumJava lazySodium) throws IOException {
final PipedInputStream pipedInputStream = new PipedInputStream();
final PipedOutputStream pipedOutputStream = new PipedOutputStream();

pipedInputStream.connect(pipedOutputStream);


Thread pipeWriter = new Thread(() -> {
Thread pipeWriter = new Thread() {
public void run () {
try {
SecretStream.State state = new SecretStream.State();
lazySodium.cryptoSecretStreamInitPull(state, h.pwHashBytes, h.outputHash);
Expand Down Expand Up @@ -146,7 +146,8 @@ public static InputStream decryptStream(InputStream i, Header h, LazySodiumJava
pipedOutputStream.close();
} catch(IOException ignored) {}
}
});
}
};

pipeWriter.start();
return pipedInputStream;
Expand Down
Binary file removed unapkm.jar
Binary file not shown.

0 comments on commit 191c446

Please sign in to comment.