Code with Finding: |
/*
* Decompiled with CFR 0_128.
*
* Could not load the following classes:
* android.text.TextUtils
* android.util.Log
* com.umeng.socom.b.c
* com.umeng.socom.b.h
*/
package com.umeng.socom.b;
import android.text.TextUtils;
import android.util.Log;
import com.umeng.socom.b.c;
import com.umeng.socom.b.h;
import java.security.Key;
import java.security.spec.AlgorithmParameterSpec;
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
public class b {
private static byte[] a = null;
private static byte[] b = "nmeug.f9/Om+L823".getBytes();
private static String c = b.class.getName();
/*
* Enabled force condition propagation
* Lifted jumps to return sites
*/
public static String a(String string, String string2) {
byte[] arrby = a;
if (arrby == null) {
arrby = c;
String string3 = "AES encrypt\u5bc6\u94a5\u521d\u59cb\u5316\u5931\u8d25";
Log.d((String)arrby, (String)string3);
return "";
}
arrby = Cipher.getInstance("AES/CBC/PKCS5Padding");
Object object = a;
byte[] arrby2 = new byte[]((byte[])object, "AES");
byte[] arrby3 = b;
object = new Object(arrby3);
int n = 1;
arrby.init(n, (Key)arrby2, (AlgorithmParameterSpec)object);
arrby2 = string.getBytes(string2);
return c.d((byte[])arrby.doFinal(arrby2));
}
public static void a(String string) {
int n = 16;
boolean bl = TextUtils.isEmpty((CharSequence)string);
if (!bl) {
byte[] arrby = h.a((String)string);
int n2 = arrby.length();
if (n2 >= n) {
n2 = 0;
arrby = arrby.substring(0, n);
}
arrby = arrby.getBytes();
a = arrby;
}
}
/*
* Enabled force condition propagation
* Lifted jumps to return sites
*/
public static String b(String string, String string2) {
byte[] arrby = a;
if (arrby == null) {
arrby = c;
String string3 = "AES decrypt\u5bc6\u94a5\u521d\u59cb\u5316\u5931\u8d25";
Log.d((String)arrby, (String)string3);
return "";
}
arrby = Cipher.getInstance("AES/CBC/PKCS5Padding");
Object object = a;
byte[] arrby2 = new byte[]((byte[])object, "AES");
byte[] arrby3 = b;
object = new Object(arrby3);
int n = 2;
arrby.init(n, (Key)arrby2, (AlgorithmParameterSpec)object);
arrby2 = c.b((String)string);
arrby2 = arrby.doFinal(arrby2);
return new byte[](arrby2, string2);
}
public static String c(String string, String string2) {
byte[] arrby = "AES/CBC/NoPadding";
Cipher cipher = Cipher.getInstance((String)arrby);
int n = cipher.getBlockSize();
byte[] arrby2 = string.getBytes(string2);
int n2 = arrby2.length;
int n3 = n2 % n;
if (n3 != 0) {
n3 = n2 % n;
n2 += (n -= n3);
}
arrby = new byte[n2];
n = arrby2.length;
System.arraycopy(arrby2, 0, arrby, 0, n);
arrby2 = a;
SecretKeySpec secretKeySpec = new SecretKeySpec(arrby2, "AES");
byte[] arrby3 = b;
arrby2 = new byte[](arrby3);
cipher.init(1, (Key)secretKeySpec, (AlgorithmParameterSpec)arrby2);
return c.d((byte[])cipher.doFinal(arrby));
}
public static String d(String string, String string2) {
byte[] arrby = Cipher.getInstance("AES/CBC/NoPadding");
Object object = a;
Object object2 = new Object((byte[])object, "AES");
byte[] arrby2 = b;
object = new Object(arrby2);
arrby.init(2, (Key)object2, (AlgorithmParameterSpec)object);
object2 = c.b((String)string);
arrby = arrby.doFinal((byte[])object2);
object2 = new Object(arrby, string2);
return object2;
}
}
|