47 lines
1.7 KiB
Java
47 lines
1.7 KiB
Java
|
package o;
|
||
|
|
||
|
import org.bouncycastle.crypto.tls.CipherSuite;
|
||
|
|
||
|
/* renamed from: o.ljj, reason: case insensitive filesystem */
|
||
|
/* loaded from: classes2.dex */
|
||
|
public final class C16159ljj implements InterfaceC16012kTv {
|
||
|
@Override // o.InterfaceC16012kTv
|
||
|
public final void c(C8198dDy c8198dDy) {
|
||
|
StringBuilder sb = new StringBuilder();
|
||
|
sb.append((char) 0);
|
||
|
while (true) {
|
||
|
if (c8198dDy.j >= c8198dDy.a.length() - c8198dDy.f) {
|
||
|
break;
|
||
|
}
|
||
|
sb.append(c8198dDy.a.charAt(c8198dDy.j));
|
||
|
c8198dDy.j++;
|
||
|
if (GpJ.a(c8198dDy.a, c8198dDy.j, 5) != 5) {
|
||
|
c8198dDy.d = 0;
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
int length = sb.length() - 1;
|
||
|
int length2 = c8198dDy.c.length() + length + 1;
|
||
|
c8198dDy.e(length2);
|
||
|
boolean z = c8198dDy.i.e - length2 > 0;
|
||
|
if (c8198dDy.j < c8198dDy.a.length() - c8198dDy.f || z) {
|
||
|
if (length <= 249) {
|
||
|
sb.setCharAt(0, (char) length);
|
||
|
} else if (length <= 1555) {
|
||
|
sb.setCharAt(0, (char) ((length / 250) + 249));
|
||
|
sb.insert(1, (char) (length % 250));
|
||
|
} else {
|
||
|
throw new IllegalStateException("Message length not in valid ranges: ".concat(String.valueOf(length)));
|
||
|
}
|
||
|
}
|
||
|
int length3 = sb.length();
|
||
|
for (int i = 0; i < length3; i++) {
|
||
|
int charAt = sb.charAt(i) + (((c8198dDy.c.length() + 1) * CipherSuite.TLS_RSA_PSK_WITH_AES_256_CBC_SHA) % 255) + 1;
|
||
|
if (charAt > 255) {
|
||
|
charAt -= 256;
|
||
|
}
|
||
|
c8198dDy.c.append((char) charAt);
|
||
|
}
|
||
|
}
|
||
|
}
|