package com.kanxue.test;
import
android.util.Base64;
import
java.security.Key;
import
javax.crypto.Cipher;
import
javax.crypto.spec.SecretKeySpec;
public
class
Utils {
public static String cipher;
static {
Utils.cipher
=
"sGpdX0nDoRPWnonSt0SQQXOk/0wID0jvtAqb2QxJoW4="
;
}
public Utils() {
super
();
}
public static String aaaaa(String arg7, String arg8) throws Exception {
String v0
=
null;
if
(arg8
=
=
null) {
return
v0;
}
if
(arg8.length() !
=
16
) {
return
v0;
}
SecretKeySpec v2
=
new SecretKeySpec(arg8.getBytes(
"utf-8"
),
"AES"
);
Cipher v3
=
Cipher.getInstance(
"AES/ECB/PKCS5Padding"
);
v3.init(
1
, ((Key)v2));
return
new String(Base64.encode(v3.doFinal(arg7.getBytes(
"utf-8"
)),
0
));
}
static String bbbbb(String arg14, String arg15) {
int
v0
=
0x100
;
char[] v1
=
new char[v0];
char[] v2
=
new char[v0];
int
v3;
for
(v3
=
0
; v3 < v0;
+
+
v3) {
v1[v3]
=
arg14.charAt(v3
%
arg14.length());
v2[v3]
=
((char)v3);
}
v3
=
0
;
int
v4;
for
(v4
=
0
; v4 < v0;
+
+
v4) {
v3
=
v2[v4]
+
v3
+
v1[v4] &
0xFF
;
char v5
=
v2[v4];
v2[v4]
=
v2[v3];
v2[v3]
=
v5;
}
v0
=
0
;
v3
=
0
;
String v4_1
=
"";
int
v5_1;
for
(v5_1
=
0
; v5_1 < arg15.length();
+
+
v5_1) {
v0
=
v0
+
1
&
0xFF
;
char v6
=
v2[v0];
v3
=
v3
+
v6 &
0xFF
;
char v7
=
((char)(v2[v3]
+
v6 &
0xFF
));
v2[v0]
=
v2[v3];
v2[v3]
=
v6;
try
{
v4_1
=
v4_1
+
new String(new char[]{((char)(arg15.charAt(v5_1) ^ v2[v7]))});
}
catch(Exception v8) {
v8.printStackTrace();
}
}
return
v4_1;
}
public static boolean test(String arg6) {
boolean v0
=
false;
new Utils();
String v2
=
Utils.bbbbb(
"kanxue"
, arg6);
try
{
if
(!Utils.aaaaa(v2,
"0123456789abcdef"
).replace(
"\n"
, "").equals(Utils.cipher)) {
return
v0;
}
}
catch(Exception v3) {
v3.printStackTrace();
return
v0;
}
return
true;
}
}