You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Fully specify configrules key and provide CRC
#android [REVIEW] [at]Allan.Bentham #rb Allan.Bentham #ROBOMERGE-AUTHOR: chris.babcock #ROBOMERGE-SOURCE: CL 18329983 via CL 18330402 via CL 18330983 via CL 18331222 via CL 18331495 via CL 18331655 via CL 18332062 via CL 18332121 #ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469) [CL 18332146 by chris babcock in ue5-release-engine-test branch]
This commit is contained in:
@@ -45,6 +45,8 @@ import java.util.Stack;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
import java.lang.Runnable;
|
||||
import java.util.zip.CRC32;
|
||||
import java.util.zip.Checksum;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.BufferedWriter;
|
||||
@@ -908,7 +910,7 @@ public class GameActivity extends $${gameActivitySuperClass}$$ implements Surfac
|
||||
Field keyField = this.getClass().getDeclaredField("CONFIGRULES_KEY");
|
||||
String key = (String)keyField.get(this);
|
||||
|
||||
Cipher cipher = Cipher.getInstance("AES");
|
||||
Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
|
||||
cipher.init(Cipher.DECRYPT_MODE, generateAESKey(key));
|
||||
byte[] decrypted = cipher.doFinal(bytesToDecompress, headerSize, sizeCompressed);
|
||||
sizeCompressed = decrypted.length;
|
||||
@@ -970,6 +972,13 @@ public class GameActivity extends $${gameActivitySuperClass}$$ implements Surfac
|
||||
byte[] configBytesInternal = getByteArrayFromFile(InternalFilesDir + "configrules.bin.png");
|
||||
byte[] configBytesExternal = getByteArrayFromFile(android.os.Environment.getExternalStorageDirectory().getAbsolutePath() + "/UnrealGame/" + ProjectName + "/configrules.bin.png");
|
||||
|
||||
if (configBytesInternal != null)
|
||||
{
|
||||
CRC32 crc = new CRC32();
|
||||
crc.update(configBytesInternal);
|
||||
Log.debug(String.format("CRC32: %08X", crc.getValue()));
|
||||
}
|
||||
|
||||
int assetsVersion = getConfigRulesVersion(configBytesAssets);
|
||||
int internalVersion = getConfigRulesVersion(configBytesInternal);
|
||||
int externalVersion = getConfigRulesVersion(configBytesExternal);
|
||||
|
||||
Reference in New Issue
Block a user