1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
  | public static /* synthetic */ SecretKeySpec gk$default(MainActivity mainActivity, String str, byte[] bArr, int i, int i2, int i3, Object obj) {
    if ((i3 & 4) != 0) {
        i = 65536;
    }
    if ((i3 & 8) != 0) {
        i2 = 256;
    }
    return mainActivity.gk(str, bArr, i, i2);
}
public final SecretKeySpec gk(String c, byte[] s, int i, int k) {
    Intrinsics.checkNotNullParameter(c, "c");
    Intrinsics.checkNotNullParameter(s, "s");
    return new SecretKeySpec(SecretKeyFactory.getInstance("PBKDF2WithHmacSHA256").generateSecret(ksp(c, s, i, k)).getEncoded(), "AES");
}
public final KeySpec ksp(String c, byte[] s, int i, int k) {
    Intrinsics.checkNotNullParameter(c, "c");
    Intrinsics.checkNotNullParameter(s, "s");
    char[] charArray = c.toCharArray();
    Intrinsics.checkNotNullExpressionValue(charArray, "toCharArray(...)");
    return new PBEKeySpec(charArray, s, i, k);
}
public final String decp(Context cot, String p) {
    Object obj;
    Intrinsics.checkNotNullParameter(cot, "cot");
    Intrinsics.checkNotNullParameter(p, "p");
    String string = cot.getString(R.string.salt);
    Intrinsics.checkNotNullExpressionValue(string, "getString(...)");
    byte[] bytes = string.getBytes(Charsets.UTF_8);
    Intrinsics.checkNotNullExpressionValue(bytes, "getBytes(...)");
    byte[] decode = Base64.decode(bytes, 0);
    String string2 = cot.getString(R.string.iv);
    Intrinsics.checkNotNullExpressionValue(string2, "getString(...)");
    byte[] bytes2 = string2.getBytes(Charsets.UTF_8);
    Intrinsics.checkNotNullExpressionValue(bytes2, "getBytes(...)");
    byte[] decode2 = Base64.decode(bytes2, 0);
    String string3 = cot.getString(R.string.ecp);
    Intrinsics.checkNotNullExpressionValue(string3, "getString(...)");
    Intrinsics.checkNotNull(decode);
    SecretKeySpec gk$default = gk$default(this, p, decode, 0, 0, 12, null);
    Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
    cipher.init(2, gk$default, new IvParameterSpec(decode2));
    try {
        Result.Companion companion = Result.INSTANCE;
        byte[] doFinal = cipher.doFinal(Base64.decode(string3, 0));
        Intrinsics.checkNotNull(doFinal);
        Log.d("Decrypted", new String(doFinal, Charsets.UTF_8));
        obj = Result.m6603constructorimpl("Thank You");
    } catch (Throwable th) {
        Result.Companion companion2 = Result.INSTANCE;
        obj = Result.m6603constructorimpl(ResultKt.createFailure(th));
    }
    return (String) (Result.m6606exceptionOrNullimpl(obj) == null ? obj : "Thank You");
}
public final String cutf(Context co, String c) {
    Intrinsics.checkNotNullParameter(co, "co");
    Intrinsics.checkNotNullParameter(c, "c");
    String str = c;
    StringBuilder sb = new StringBuilder();
    int length = str.length();
    for (int i = 0; i < length; i++) {
        char charAt = str.charAt(i);
        if (Character.isDigit(charAt)) {
            sb.append(charAt);
        }
    }
    String sb2 = sb.toString();
    Intrinsics.checkNotNullExpressionValue(sb2, "toString(...)");
    String take = StringsKt.take(sb2, 4);
    if (Intrinsics.areEqual(take, "")) {
        return "Nuh Uh";
    }
    return decp(co, take);
}
  |