From de152752975b554cea17662cae9d19fab6d31d1e Mon Sep 17 00:00:00 2001 From: Dmitry Isaenko Date: Tue, 7 Feb 2023 00:08:33 +0300 Subject: [PATCH] Correct references from Java 8 --- pom.xml | 4 +++- src/main/java/libKonogonka/aesctr/AesCtrDecryptClassic.java | 3 ++- .../java/libKonogonka/fs/other/System2/ini1/Kip1Unpacker.java | 3 ++- src/main/resources/log4j2.properties | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index bfe45e2..e4d2a73 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ ru.redrise libKonogonka - 0.1 + 0.2-SNAPSHOT https://git.redrise.ru/desu/${project.name}}/ @@ -57,6 +57,7 @@ + org.bouncycastle bcprov-jdk15on @@ -71,6 +72,7 @@ + org.apache.logging.log4j log4j-core diff --git a/src/main/java/libKonogonka/aesctr/AesCtrDecryptClassic.java b/src/main/java/libKonogonka/aesctr/AesCtrDecryptClassic.java index d8ebeca..9f3b34a 100644 --- a/src/main/java/libKonogonka/aesctr/AesCtrDecryptClassic.java +++ b/src/main/java/libKonogonka/aesctr/AesCtrDecryptClassic.java @@ -24,6 +24,7 @@ import javax.crypto.Cipher; import javax.crypto.spec.IvParameterSpec; import javax.crypto.spec.SecretKeySpec; import java.math.BigInteger; +import java.nio.Buffer; import java.nio.ByteBuffer; public class AesCtrDecryptClassic extends AesCtrDecrypt { @@ -52,7 +53,7 @@ public class AesCtrDecryptClassic extends AesCtrDecrypt { byte[] ctrCalculated = ctr.add(updateTo).toByteArray(); if (ctrCalculated.length != 0x10) { ByteBuffer ctrByteBuffer = ByteBuffer.allocate(0x10); - ctrByteBuffer.position(0x10 - ctrCalculated.length); + ((Buffer) ctrByteBuffer).position(0x10 - ctrCalculated.length); ctrByteBuffer.put(ctrCalculated); return ctrByteBuffer.array(); } diff --git a/src/main/java/libKonogonka/fs/other/System2/ini1/Kip1Unpacker.java b/src/main/java/libKonogonka/fs/other/System2/ini1/Kip1Unpacker.java index 566d757..0cf89c6 100644 --- a/src/main/java/libKonogonka/fs/other/System2/ini1/Kip1Unpacker.java +++ b/src/main/java/libKonogonka/fs/other/System2/ini1/Kip1Unpacker.java @@ -25,6 +25,7 @@ import libKonogonka.aesctr.InFileStreamClassicProducer; import java.io.BufferedInputStream; import java.io.File; import java.io.RandomAccessFile; +import java.nio.Buffer; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.charset.StandardCharsets; @@ -156,7 +157,7 @@ public class Kip1Unpacker { ByteBuffer resultingHeader = ByteBuffer.allocate(HEADER_SIZE).order(ByteOrder.LITTLE_ENDIAN); resultingHeader.put("KIP1".getBytes(StandardCharsets.US_ASCII)) .put(kip1Header.getName().getBytes(StandardCharsets.US_ASCII)); - resultingHeader.position(0x10); + ((Buffer) resultingHeader).position(0x10); resultingHeader.put(kip1Header.getProgramId()) .putInt(kip1Header.getVersion()) .put(kip1Header.getMainThreadPriority()) diff --git a/src/main/resources/log4j2.properties b/src/main/resources/log4j2.properties index ade6525..d631910 100644 --- a/src/main/resources/log4j2.properties +++ b/src/main/resources/log4j2.properties @@ -15,7 +15,7 @@ status = error name = DebugConfigDevelopmentOnlyVerbose # Configure root logger level -rootLogger.level = INFO +rootLogger.level = DEBUG # Root logger referring to console appender rootLogger.appenderRef.stdout.ref = consoleLogger