From c60e12eeba8b7b1bc42f2f662ba656b8b52953eb Mon Sep 17 00:00:00 2001 From: ReznoRMichael Date: Mon, 25 Jan 2021 21:45:53 +0100 Subject: [PATCH] const aesjs --- src/js/LoadSaveFile.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/js/LoadSaveFile.js b/src/js/LoadSaveFile.js index 6c85b9d..0849623 100644 --- a/src/js/LoadSaveFile.js +++ b/src/js/LoadSaveFile.js @@ -1,6 +1,4 @@ /* global require HKReadTextArea */ -// AES JS -const aesjs = require("./aes-js.js"); /* Parts of the code thanks to bloodorca https://github.com/bloodorca/hollow (base64.js, functions.js) with slight modifications. The steps used there for decryption were taken from KayDeeTee https://github.com/KayDeeTee/Hollow-Knight-SaveManager @@ -9,6 +7,9 @@ const aesjs = require("./aes-js.js"); // ---------------- Constants ----------------- // +// AES JS for file decryption +const aesjs = require("./aes-js.js"); + const CSHARP_HEADER = [0, 1, 0, 0, 0, 255, 255, 255, 255, 1, 0, 0, 0, 0, 0, 0, 0, 6, 1, 0, 0, 0]; // 22 bytes const BASE64_ARRAY = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".split("").map(c => c.charCodeAt(0));