qw.java
3.94 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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
import com.google.common.base.Preconditions;
import com.google.common.hash.AbstractStreamingHashFunction;
import com.google.common.hash.HashCode;
import com.google.common.hash.Hasher;
import java.io.Serializable;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Arrays;
public final class qw
extends AbstractStreamingHashFunction
implements Serializable
{
private final MessageDigest a;
private final int b;
private final boolean c;
private final String d;
qw(String paramString1, int paramInt, String paramString2)
{
this.d = ((String)Preconditions.checkNotNull(paramString2));
this.a = a(paramString1);
int i = this.a.getDigestLength();
if ((paramInt >= 4) && (paramInt <= i)) {}
for (boolean bool = true;; bool = false)
{
Preconditions.checkArgument(bool, "bytes (%s) must be >= 4 and < %s", new Object[] { Integer.valueOf(paramInt), Integer.valueOf(i) });
this.b = paramInt;
this.c = a();
return;
}
}
public qw(String paramString1, String paramString2)
{
this.a = a(paramString1);
this.b = this.a.getDigestLength();
this.d = ((String)Preconditions.checkNotNull(paramString2));
this.c = a();
}
private static MessageDigest a(String paramString)
{
try
{
paramString = MessageDigest.getInstance(paramString);
return paramString;
}
catch (NoSuchAlgorithmException paramString)
{
throw new AssertionError(paramString);
}
}
private boolean a()
{
try
{
this.a.clone();
return true;
}
catch (CloneNotSupportedException localCloneNotSupportedException) {}
return false;
}
public final int bits()
{
return this.b * 8;
}
public final Hasher newHasher()
{
if (this.c) {
try
{
qw.a locala = new qw.a((MessageDigest)this.a.clone(), this.b, (byte)0);
return locala;
}
catch (CloneNotSupportedException localCloneNotSupportedException) {}
}
return new qw.a(a(this.a.getAlgorithm()), this.b, (byte)0);
}
public final String toString()
{
return this.d;
}
final Object writeReplace()
{
return new qw.b(this.a.getAlgorithm(), this.b, this.d, (byte)0);
}
static final class a
extends qq
{
private final MessageDigest a;
private final int b;
private boolean c;
private a(MessageDigest paramMessageDigest, int paramInt)
{
this.a = paramMessageDigest;
this.b = paramInt;
}
private void a()
{
if (!this.c) {}
for (boolean bool = true;; bool = false)
{
Preconditions.checkState(bool, "Cannot re-use a Hasher after calling hash() on it");
return;
}
}
protected final void a(byte paramByte)
{
a();
this.a.update(paramByte);
}
protected final void a(byte[] paramArrayOfByte)
{
a();
this.a.update(paramArrayOfByte);
}
protected final void a(byte[] paramArrayOfByte, int paramInt1, int paramInt2)
{
a();
this.a.update(paramArrayOfByte, paramInt1, paramInt2);
}
public final HashCode hash()
{
a();
this.c = true;
if (this.b == this.a.getDigestLength()) {
return HashCode.a(this.a.digest());
}
return HashCode.a(Arrays.copyOf(this.a.digest(), this.b));
}
}
static final class b
implements Serializable
{
private static final long serialVersionUID = 0L;
private final String a;
private final int b;
private final String c;
private b(String paramString1, int paramInt, String paramString2)
{
this.a = paramString1;
this.b = paramInt;
this.c = paramString2;
}
private Object readResolve()
{
return new qw(this.a, this.b, this.c);
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/qw.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/