· 7 years ago · Jun 15, 2018, 12:26 AM
1public static String DecryptSimple(String encryptedStr) {
2 String decryptedStr = String.format("%s%s", new Object[] {
3 encryptedStr.substring(encryptedStr.length() - 8),
4 encryptedStr.substring(8, encryptedStr.length() - 8) });
5 return decryptedStr;
6}
7
8public static String GetAPIKeyStr(String encryptedConfigStr) {
9 String[] keyArr = encryptedConfigStr.split("#");
10 String apiKey = DecryptSimple(keyArr[1]);
11 return apiKey;
12}
13
14public static String GetSecretKeyStr(String encryptedConfigStr) {
15 String[] keyArr = encryptedConfigStr.split("#");
16 String secretKey = DecryptSimple(keyArr[2]);
17 return secretKey;
18}