diff --git a/LauncherCore/src/main/java/pro/gravit/utils/helper/SecurityHelper.java b/LauncherCore/src/main/java/pro/gravit/utils/helper/SecurityHelper.java index b64dc069..26dfe32a 100644 --- a/LauncherCore/src/main/java/pro/gravit/utils/helper/SecurityHelper.java +++ b/LauncherCore/src/main/java/pro/gravit/utils/helper/SecurityHelper.java @@ -488,12 +488,12 @@ public static Cipher newRSAEncryptCipher(RSAPublicKey publicKey) { //AES public static byte[] encrypt(String seed, byte[] cleartext) throws Exception { - byte[] rawKey = getAESKey(seed.getBytes()); + byte[] rawKey = getAESKey(IOHelper.encode(seed)); return encrypt(rawKey, cleartext); } public static byte[] encrypt(String seed, String cleartext) throws Exception { - return encrypt(seed, cleartext.getBytes()); + return encrypt(seed, IOHelper.encode(cleartext)); } public static byte[] getAESKey(byte[] seed) throws Exception { @@ -520,7 +520,7 @@ public static byte[] decrypt(byte[] raw, byte[] encrypted) throws Exception { } public static byte[] decrypt(String seed, byte[] encrypted) throws Exception { - return decrypt(getAESKey(seed.getBytes()), encrypted); + return decrypt(getAESKey(IOHelper.encode(seed)), encrypted); } public static byte[] fromHex(String hexString) {