SignatureUtils.java
4.58 KB
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
package com.bitstrips.imoji.security;
public class SignatureUtils
{
private static String a(byte[] paramArrayOfByte)
{
StringBuilder localStringBuilder = new StringBuilder();
int j = paramArrayOfByte.length;
int i = 0;
while (i < j)
{
localStringBuilder.append(String.format("%02X", new Object[] { Byte.valueOf(paramArrayOfByte[i]) }));
i += 1;
}
return localStringBuilder.toString();
}
/* Error */
public static boolean isInstalledSignatureTrusted(android.content.Context paramContext, String paramString1, String paramString2)
{
// Byte code:
// 0: aload_0
// 1: invokevirtual 50 android/content/Context:getPackageManager ()Landroid/content/pm/PackageManager;
// 4: astore_0
// 5: aload_0
// 6: aload_1
// 7: bipush 64
// 9: invokevirtual 56 android/content/pm/PackageManager:getPackageInfo (Ljava/lang/String;I)Landroid/content/pm/PackageInfo;
// 12: astore_1
// 13: ldc 58
// 15: invokestatic 64 java/security/cert/CertificateFactory:getInstance (Ljava/lang/String;)Ljava/security/cert/CertificateFactory;
// 18: astore_0
// 19: new 66 java/io/ByteArrayInputStream
// 22: dup
// 23: aload_1
// 24: getfield 72 android/content/pm/PackageInfo:signatures [Landroid/content/pm/Signature;
// 27: iconst_0
// 28: aaload
// 29: invokevirtual 78 android/content/pm/Signature:toByteArray ()[B
// 32: invokespecial 81 java/io/ByteArrayInputStream:<init> ([B)V
// 35: astore_1
// 36: aload_0
// 37: aload_1
// 38: invokevirtual 85 java/security/cert/CertificateFactory:generateCertificate (Ljava/io/InputStream;)Ljava/security/cert/Certificate;
// 41: checkcast 87 java/security/cert/X509Certificate
// 44: astore_0
// 45: ldc 89
// 47: invokestatic 94 java/security/MessageDigest:getInstance (Ljava/lang/String;)Ljava/security/MessageDigest;
// 50: aload_0
// 51: invokevirtual 97 java/security/cert/X509Certificate:getEncoded ()[B
// 54: invokevirtual 101 java/security/MessageDigest:digest ([B)[B
// 57: astore_0
// 58: aload_2
// 59: aload_0
// 60: invokestatic 103 com/bitstrips/imoji/security/SignatureUtils:a ([B)Ljava/lang/String;
// 63: invokevirtual 107 java/lang/String:equals (Ljava/lang/Object;)Z
// 66: ireturn
// 67: astore_0
// 68: ldc 109
// 70: ldc 111
// 72: invokestatic 117 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;)I
// 75: pop
// 76: iconst_0
// 77: ireturn
// 78: astore_0
// 79: ldc 109
// 81: ldc 119
// 83: invokestatic 117 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;)I
// 86: pop
// 87: aload_0
// 88: invokevirtual 122 java/security/cert/CertificateException:printStackTrace ()V
// 91: iconst_0
// 92: ireturn
// 93: astore_0
// 94: ldc 109
// 96: ldc 124
// 98: invokestatic 117 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;)I
// 101: pop
// 102: aload_0
// 103: invokevirtual 122 java/security/cert/CertificateException:printStackTrace ()V
// 106: iconst_0
// 107: ireturn
// 108: astore_0
// 109: ldc 109
// 111: ldc 126
// 113: invokestatic 117 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;)I
// 116: pop
// 117: aload_0
// 118: invokevirtual 127 java/security/NoSuchAlgorithmException:printStackTrace ()V
// 121: iconst_0
// 122: ireturn
// 123: astore_0
// 124: ldc 109
// 126: ldc 124
// 128: invokestatic 117 android/util/Log:e (Ljava/lang/String;Ljava/lang/String;)I
// 131: pop
// 132: aload_0
// 133: invokevirtual 122 java/security/cert/CertificateException:printStackTrace ()V
// 136: iconst_0
// 137: ireturn
// Local variable table:
// start length slot name signature
// 0 138 0 paramContext android.content.Context
// 0 138 1 paramString1 String
// 0 138 2 paramString2 String
// Exception table:
// from to target type
// 5 13 67 android/content/pm/PackageManager$NameNotFoundException
// 13 19 78 java/security/cert/CertificateException
// 36 45 93 java/security/cert/CertificateException
// 45 58 108 java/security/NoSuchAlgorithmException
// 45 58 123 java/security/cert/CertificateException
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/bitstrips/imoji/security/SignatureUtils.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/