CrackMe.apk
Download file
package okio;
import com.google.common.base.Ascii;
import java.io.EOFException;
import java.io.IOException;
import java.io.InputStream;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.OutputStream;
import java.io.Serializable;
import java.lang.reflect.Field;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.security.InvalidKeyException;
import java.util.Arrays;
import java.util.Objects;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import kotlin.Deprecated;
import kotlin.DeprecationLevel;
import kotlin.Metadata;
import kotlin.ReplaceWith;
import kotlin.collections.ArraysKt;
import kotlin.jvm.JvmStatic;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.Charsets;
import kotlin.text.StringsKt;
import okio.internal.ByteStringKt;
import org.apache.commons.codec.digest.MessageDigestAlgorithms;
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000p\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u000f\n\u0000\n\u0002\u0010\u0012\n\u0002\b\u0004\n\u0002\u0010\b\n\u0002\b\u0006\n\u0002\u0010\u000e\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\b\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u0005\n\u0002\b\u001a\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\b\n\u0002\u0018\u0002\n\u0002\b\t\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\b\u0016\u0018\u0000 Z2\u00020\u00012\b\u0012\u0004\u0012\u00020\u00000\u0002:\u0001ZB\u000f\b\u0000\u0012\u0006\u0010\u0003\u001a\u00020\u0004¢\u0006\u0002\u0010\u0005J\b\u0010\u0015\u001a\u00020\u0016H\u0016J\b\u0010\u0017\u001a\u00020\u0010H\u0016J\b\u0010\u0018\u001a\u00020\u0010H\u0016J\u0011\u0010\u0019\u001a\u00020\t2\u0006\u0010\u001a\u001a\u00020\u0000H\u0002J\u0015\u0010\u001b\u001a\u00020\u00002\u0006\u0010\u001c\u001a\u00020\u0010H\u0010¢\u0006\u0002\b\u001dJ\u000e\u0010\u001e\u001a\u00020\u001f2\u0006\u0010 \u001a\u00020\u0004J\u000e\u0010\u001e\u001a\u00020\u001f2\u0006\u0010 \u001a\u00020\u0000J\u0013\u0010!\u001a\u00020\u001f2\b\u0010\u001a\u001a\u0004\u0018\u00010\"H\u0002J\u0016\u0010#\u001a\u00020$2\u0006\u0010%\u001a\u00020\tH\u0002¢\u0006\u0002\b&J\u0015\u0010&\u001a\u00020$2\u0006\u0010%\u001a\u00020\tH\u0007¢\u0006\u0002\b'J\r\u0010(\u001a\u00020\tH\u0010¢\u0006\u0002\b)J\b\u0010\b\u001a\u00020\tH\u0016J\b\u0010*\u001a\u00020\u0010H\u0016J\u001d\u0010+\u001a\u00020\u00002\u0006\u0010\u001c\u001a\u00020\u00102\u0006\u0010,\u001a\u00020\u0000H\u0010¢\u0006\u0002\b-J\u0010\u0010.\u001a\u00020\u00002\u0006\u0010,\u001a\u00020\u0000H\u0016J\u0010\u0010/\u001a\u00020\u00002\u0006\u0010,\u001a\u00020\u0000H\u0016J\u0010\u00100\u001a\u00020\u00002\u0006\u0010,\u001a\u00020\u0000H\u0016J\u001a\u00101\u001a\u00020\t2\u0006\u0010\u001a\u001a\u00020\u00042\b\b\u0002\u00102\u001a\u00020\tH\u0017J\u001a\u00101\u001a\u00020\t2\u0006\u0010\u001a\u001a\u00020\u00002\b\b\u0002\u00102\u001a\u00020\tH\u0007J\r\u00103\u001a\u00020\u0004H\u0010¢\u0006\u0002\b4J\u0015\u00105\u001a\u00020$2\u0006\u00106\u001a\u00020\tH\u0010¢\u0006\u0002\b7J\u001a\u00108\u001a\u00020\t2\u0006\u0010\u001a\u001a\u00020\u00042\b\b\u0002\u00102\u001a\u00020\tH\u0017J\u001a\u00108\u001a\u00020\t2\u0006\u0010\u001a\u001a\u00020\u00002\b\b\u0002\u00102\u001a\u00020\tH\u0007J\u0006\u00109\u001a\u00020\u0000J(\u0010:\u001a\u00020\u001f2\u0006\u0010;\u001a\u00020\t2\u0006\u0010\u001a\u001a\u00020\u00042\u0006\u0010<\u001a\u00020\t2\u0006\u0010=\u001a\u00020\tH\u0016J(\u0010:\u001a\u00020\u001f2\u0006\u0010;\u001a\u00020\t2\u0006\u0010\u001a\u001a\u00020\u00002\u0006\u0010<\u001a\u00020\t2\u0006\u0010=\u001a\u00020\tH\u0016J\u0010\u0010>\u001a\u00020?2\u0006\u0010@\u001a\u00020AH\u0002J\u0006\u0010B\u001a\u00020\u0000J\u0006\u0010C\u001a\u00020\u0000J\u0006\u0010D\u001a\u00020\u0000J\r\u0010\u000e\u001a\u00020\tH\u0007¢\u0006\u0002\bEJ\u000e\u0010F\u001a\u00020\u001f2\u0006\u0010G\u001a\u00020\u0004J\u000e\u0010F\u001a\u00020\u001f2\u0006\u0010G\u001a\u00020\u0000J\u0010\u0010H\u001a\u00020\u00102\u0006\u0010I\u001a\u00020JH\u0016J\u001c\u0010K\u001a\u00020\u00002\b\b\u0002\u0010L\u001a\u00020\t2\b\b\u0002\u0010M\u001a\u00020\tH\u0017J\b\u0010N\u001a\u00020\u0000H\u0016J\b\u0010O\u001a\u00020\u0000H\u0016J\b\u0010P\u001a\u00020\u0004H\u0016J\b\u0010Q\u001a\u00020\u0010H\u0016J\b\u0010\u000f\u001a\u00020\u0010H\u0016J\u0010\u0010R\u001a\u00020?2\u0006\u0010S\u001a\u00020TH\u0016J%\u0010R\u001a\u00020?2\u0006\u0010U\u001a\u00020V2\u0006\u0010;\u001a\u00020\t2\u0006\u0010=\u001a\u00020\tH\u0010¢\u0006\u0002\bWJ\u0010\u0010X\u001a\u00020?2\u0006\u0010S\u001a\u00020YH\u0002R\u0014\u0010\u0003\u001a\u00020\u0004X\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u0006\u0010\u0007R\u001a\u0010\b\u001a\u00020\tX\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\n\u0010\u000b\"\u0004\b\f\u0010\rR\u0011\u0010\u000e\u001a\u00020\t8G¢\u0006\u0006\u001a\u0004\b\u000e\u0010\u000bR\u001c\u0010\u000f\u001a\u0004\u0018\u00010\u0010X\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0011\u0010\u0012\"\u0004\b\u0013\u0010\u0014¨\u0006["}, d2 = {"Lokio/ByteString;", "Ljava/io/Serializable;", "", "data", "", "([B)V", "getData$okio", "()[B", "hashCode", "", "getHashCode$okio", "()I", "setHashCode$okio", "(I)V", "size", "utf8", "", "getUtf8$okio", "()Ljava/lang/String;", "setUtf8$okio", "(Ljava/lang/String;)V", "asByteBuffer", "Ljava/nio/ByteBuffer;", "base64", "base64Url", "compareTo", "other", "digest", "algorithm", "digest$okio", "endsWith", "", "suffix", "equals", "", "get", "", "index", "getByte", "-deprecated_getByte", "getSize", "getSize$okio", "hex", "hmac", "key", "hmac$okio", "hmacSha1", "hmacSha256", "hmacSha512", "indexOf", "fromIndex", "internalArray", "internalArray$okio", "internalGet", "pos", "internalGet$okio", "lastIndexOf", "md5", "rangeEquals", "offset", "otherOffset", "byteCount", "readObject", "", "in", "Ljava/io/ObjectInputStream;", "sha1", "sha256", "sha512", "-deprecated_size", "startsWith", "prefix", "string", "charset", "Ljava/nio/charset/Charset;", "substring", "beginIndex", "endIndex", "toAsciiLowercase", "toAsciiUppercase", "toByteArray", "toString", "write", "out", "Ljava/io/OutputStream;", "buffer", "Lokio/Buffer;", "write$okio", "writeObject", "Ljava/io/ObjectOutputStream;", "Companion", "okio"}, k = 1, mv = {1, 4, 0})
/* compiled from: ByteString.kt */
public class ByteString implements Serializable, Comparable<ByteString> {
public static final Companion Companion = new Companion((DefaultConstructorMarker) null);
public static final ByteString EMPTY = new ByteString(new byte[0]);
private static final long serialVersionUID = 1;
private final byte[] data;
private transient int hashCode;
private transient String utf8;
@JvmStatic
public static final ByteString decodeBase64(String str) {
return Companion.decodeBase64(str);
}
@JvmStatic
public static final ByteString decodeHex(String str) {
return Companion.decodeHex(str);
}
@JvmStatic
public static final ByteString encodeString(String str, Charset charset) {
return Companion.encodeString(str, charset);
}
@JvmStatic
public static final ByteString encodeUtf8(String str) {
return Companion.encodeUtf8(str);
}
public static /* synthetic */ int indexOf$default(ByteString byteString, ByteString byteString2, int i, int i2, Object obj) {
if (obj == null) {
if ((i2 & 2) != 0) {
i = 0;
}
return byteString.indexOf(byteString2, i);
}
throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: indexOf");
}
public static /* synthetic */ int indexOf$default(ByteString byteString, byte[] bArr, int i, int i2, Object obj) {
if (obj == null) {
if ((i2 & 2) != 0) {
i = 0;
}
return byteString.indexOf(bArr, i);
}
throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: indexOf");
}
public static /* synthetic */ int lastIndexOf$default(ByteString byteString, ByteString byteString2, int i, int i2, Object obj) {
if (obj == null) {
if ((i2 & 2) != 0) {
i = byteString.size();
}
return byteString.lastIndexOf(byteString2, i);
}
throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: lastIndexOf");
}
public static /* synthetic */ int lastIndexOf$default(ByteString byteString, byte[] bArr, int i, int i2, Object obj) {
if (obj == null) {
if ((i2 & 2) != 0) {
i = byteString.size();
}
return byteString.lastIndexOf(bArr, i);
}
throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: lastIndexOf");
}
@JvmStatic
public static final ByteString of(ByteBuffer byteBuffer) {
return Companion.of(byteBuffer);
}
@JvmStatic
public static final ByteString of(byte... bArr) {
return Companion.of(bArr);
}
@JvmStatic
public static final ByteString of(byte[] bArr, int i, int i2) {
return Companion.of(bArr, i, i2);
}
@JvmStatic
public static final ByteString read(InputStream inputStream, int i) throws IOException {
return Companion.read(inputStream, i);
}
public static /* synthetic */ ByteString substring$default(ByteString byteString, int i, int i2, int i3, Object obj) {
if (obj == null) {
if ((i3 & 1) != 0) {
i = 0;
}
if ((i3 & 2) != 0) {
i2 = byteString.size();
}
return byteString.substring(i, i2);
}
throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: substring");
}
public final int indexOf(ByteString byteString) {
return indexOf$default(this, byteString, 0, 2, (Object) null);
}
public final int indexOf(byte[] bArr) {
return indexOf$default(this, bArr, 0, 2, (Object) null);
}
public final int lastIndexOf(ByteString byteString) {
return lastIndexOf$default(this, byteString, 0, 2, (Object) null);
}
public final int lastIndexOf(byte[] bArr) {
return lastIndexOf$default(this, bArr, 0, 2, (Object) null);
}
public final ByteString substring() {
return substring$default(this, 0, 0, 3, (Object) null);
}
public final ByteString substring(int i) {
return substring$default(this, i, 0, 2, (Object) null);
}
public ByteString(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "data");
this.data = bArr;
}
public final byte[] getData$okio() {
return this.data;
}
public final int getHashCode$okio() {
return this.hashCode;
}
public final void setHashCode$okio(int i) {
this.hashCode = i;
}
public final String getUtf8$okio() {
return this.utf8;
}
public final void setUtf8$okio(String str) {
this.utf8 = str;
}
public String string(Charset charset) {
Intrinsics.checkNotNullParameter(charset, "charset");
return new String(this.data, charset);
}
public final ByteString md5() {
return digest$okio(MessageDigestAlgorithms.MD5);
}
public final ByteString sha1() {
return digest$okio(MessageDigestAlgorithms.SHA_1);
}
public final ByteString sha256() {
return digest$okio(MessageDigestAlgorithms.SHA_256);
}
public final ByteString sha512() {
return digest$okio(MessageDigestAlgorithms.SHA_512);
}
public ByteString digest$okio(String str) {
Intrinsics.checkNotNullParameter(str, "algorithm");
return ByteStringKt.commonDigest(this, str);
}
public ByteString hmacSha1(ByteString byteString) {
Intrinsics.checkNotNullParameter(byteString, "key");
return hmac$okio("HmacSHA1", byteString);
}
public ByteString hmacSha256(ByteString byteString) {
Intrinsics.checkNotNullParameter(byteString, "key");
return hmac$okio("HmacSHA256", byteString);
}
public ByteString hmacSha512(ByteString byteString) {
Intrinsics.checkNotNullParameter(byteString, "key");
return hmac$okio("HmacSHA512", byteString);
}
public ByteString hmac$okio(String str, ByteString byteString) {
Intrinsics.checkNotNullParameter(str, "algorithm");
Intrinsics.checkNotNullParameter(byteString, "key");
try {
Mac instance = Mac.getInstance(str);
instance.init(new SecretKeySpec(byteString.toByteArray(), str));
byte[] doFinal = instance.doFinal(this.data);
Intrinsics.checkNotNullExpressionValue(doFinal, "mac.doFinal(data)");
return new ByteString(doFinal);
} catch (InvalidKeyException e) {
throw new IllegalArgumentException(e);
}
}
public final byte getByte(int i) {
return internalGet$okio(i);
}
public final int size() {
return getSize$okio();
}
public ByteBuffer asByteBuffer() {
ByteBuffer asReadOnlyBuffer = ByteBuffer.wrap(this.data).asReadOnlyBuffer();
Intrinsics.checkNotNullExpressionValue(asReadOnlyBuffer, "ByteBuffer.wrap(data).asReadOnlyBuffer()");
return asReadOnlyBuffer;
}
public void write(OutputStream outputStream) throws IOException {
Intrinsics.checkNotNullParameter(outputStream, "out");
outputStream.write(this.data);
}
public void write$okio(Buffer buffer, int i, int i2) {
Intrinsics.checkNotNullParameter(buffer, "buffer");
ByteStringKt.commonWrite(this, buffer, i, i2);
}
public final int indexOf(ByteString byteString, int i) {
Intrinsics.checkNotNullParameter(byteString, "other");
return indexOf(byteString.internalArray$okio(), i);
}
private final void readObject(ObjectInputStream objectInputStream) throws IOException {
ByteString read = Companion.read(objectInputStream, objectInputStream.readInt());
Field declaredField = ByteString.class.getDeclaredField("data");
Intrinsics.checkNotNullExpressionValue(declaredField, "field");
declaredField.setAccessible(true);
declaredField.set(this, read.data);
}
private final void writeObject(ObjectOutputStream objectOutputStream) throws IOException {
objectOutputStream.writeInt(this.data.length);
objectOutputStream.write(this.data);
}
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to operator function", replaceWith = @ReplaceWith(expression = "this[index]", imports = {}))
/* renamed from: -deprecated_getByte reason: not valid java name */
public final byte m1987deprecated_getByte(int i) {
return getByte(i);
}
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to val", replaceWith = @ReplaceWith(expression = "size", imports = {}))
/* renamed from: -deprecated_size reason: not valid java name */
public final int m1988deprecated_size() {
return size();
}
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000N\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\t\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0012\n\u0002\u0010\u0005\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0005\b\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\u0017\u0010\u0007\u001a\u0004\u0018\u00010\u00042\u0006\u0010\b\u001a\u00020\tH\u0007¢\u0006\u0002\b\nJ\u0015\u0010\u000b\u001a\u00020\u00042\u0006\u0010\b\u001a\u00020\tH\u0007¢\u0006\u0002\b\fJ\u001d\u0010\r\u001a\u00020\u00042\u0006\u0010\b\u001a\u00020\t2\u0006\u0010\u000e\u001a\u00020\u000fH\u0007¢\u0006\u0002\b\u0010J\u0015\u0010\u0011\u001a\u00020\u00042\u0006\u0010\b\u001a\u00020\tH\u0007¢\u0006\u0002\b\u0012J\u0015\u0010\u0013\u001a\u00020\u00042\u0006\u0010\u0014\u001a\u00020\u0015H\u0007¢\u0006\u0002\b\u0016J\u0014\u0010\u0013\u001a\u00020\u00042\n\u0010\u0017\u001a\u00020\u0018\"\u00020\u0019H\u0007J%\u0010\u0013\u001a\u00020\u00042\u0006\u0010\u001a\u001a\u00020\u00182\u0006\u0010\u001b\u001a\u00020\u001c2\u0006\u0010\u001d\u001a\u00020\u001cH\u0007¢\u0006\u0002\b\u0016J\u001d\u0010\u001e\u001a\u00020\u00042\u0006\u0010\u001f\u001a\u00020 2\u0006\u0010\u001d\u001a\u00020\u001cH\u0007¢\u0006\u0002\b!J\u000e\u0010\u0007\u001a\u0004\u0018\u00010\u0004*\u00020\tH\u0007J\f\u0010\u000b\u001a\u00020\u0004*\u00020\tH\u0007J\u001b\u0010\"\u001a\u00020\u0004*\u00020\t2\b\b\u0002\u0010\u000e\u001a\u00020\u000fH\u0007¢\u0006\u0002\b\rJ\f\u0010\u0011\u001a\u00020\u0004*\u00020\tH\u0007J\u0019\u0010#\u001a\u00020\u0004*\u00020 2\u0006\u0010\u001d\u001a\u00020\u001cH\u0007¢\u0006\u0002\b\u001eJ\u0011\u0010$\u001a\u00020\u0004*\u00020\u0015H\u0007¢\u0006\u0002\b\u0013J%\u0010$\u001a\u00020\u0004*\u00020\u00182\b\b\u0002\u0010\u001b\u001a\u00020\u001c2\b\b\u0002\u0010\u001d\u001a\u00020\u001cH\u0007¢\u0006\u0002\b\u0013R\u0010\u0010\u0003\u001a\u00020\u00048\u0006X\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0005\u001a\u00020\u0006XT¢\u0006\u0002\n\u0000¨\u0006%"}, d2 = {"Lokio/ByteString$Companion;", "", "()V", "EMPTY", "Lokio/ByteString;", "serialVersionUID", "", "decodeBase64", "string", "", "-deprecated_decodeBase64", "decodeHex", "-deprecated_decodeHex", "encodeString", "charset", "Ljava/nio/charset/Charset;", "-deprecated_encodeString", "encodeUtf8", "-deprecated_encodeUtf8", "of", "buffer", "Ljava/nio/ByteBuffer;", "-deprecated_of", "data", "", "", "array", "offset", "", "byteCount", "read", "inputstream", "Ljava/io/InputStream;", "-deprecated_read", "encode", "readByteString", "toByteString", "okio"}, k = 1, mv = {1, 4, 0})
/* compiled from: ByteString.kt */
public static final class Companion {
public static /* synthetic */ ByteString of$default(Companion companion, byte[] bArr, int i, int i2, int i3, Object obj) {
if ((i3 & 1) != 0) {
i = 0;
}
if ((i3 & 2) != 0) {
i2 = bArr.length;
}
return companion.of(bArr, i, i2);
}
private Companion() {
}
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
@JvmStatic
public final ByteString of(ByteBuffer byteBuffer) {
Intrinsics.checkNotNullParameter(byteBuffer, "$this$toByteString");
byte[] bArr = new byte[byteBuffer.remaining()];
byteBuffer.get(bArr);
return new ByteString(bArr);
}
public static /* synthetic */ ByteString encodeString$default(Companion companion, String str, Charset charset, int i, Object obj) {
if ((i & 1) != 0) {
charset = Charsets.UTF_8;
}
return companion.encodeString(str, charset);
}
@JvmStatic
public final ByteString encodeString(String str, Charset charset) {
Intrinsics.checkNotNullParameter(str, "$this$encode");
Intrinsics.checkNotNullParameter(charset, "charset");
byte[] bytes = str.getBytes(charset);
Intrinsics.checkNotNullExpressionValue(bytes, "(this as java.lang.String).getBytes(charset)");
return new ByteString(bytes);
}
@JvmStatic
public final ByteString read(InputStream inputStream, int i) throws IOException {
Intrinsics.checkNotNullParameter(inputStream, "$this$readByteString");
int i2 = 0;
if (i >= 0) {
byte[] bArr = new byte[i];
while (i2 < i) {
int read = inputStream.read(bArr, i2, i - i2);
if (read != -1) {
i2 += read;
} else {
throw new EOFException();
}
}
return new ByteString(bArr);
}
throw new IllegalArgumentException(("byteCount < 0: " + i).toString());
}
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to extension function", replaceWith = @ReplaceWith(expression = "string.decodeBase64()", imports = {"okio.ByteString.Companion.decodeBase64"}))
/* renamed from: -deprecated_decodeBase64 reason: not valid java name */
public final ByteString m1989deprecated_decodeBase64(String str) {
Intrinsics.checkNotNullParameter(str, "string");
Companion companion = this;
return decodeBase64(str);
}
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to extension function", replaceWith = @ReplaceWith(expression = "string.decodeHex()", imports = {"okio.ByteString.Companion.decodeHex"}))
/* renamed from: -deprecated_decodeHex reason: not valid java name */
public final ByteString m1990deprecated_decodeHex(String str) {
Intrinsics.checkNotNullParameter(str, "string");
Companion companion = this;
return decodeHex(str);
}
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to extension function", replaceWith = @ReplaceWith(expression = "string.encode(charset)", imports = {"okio.ByteString.Companion.encode"}))
/* renamed from: -deprecated_encodeString reason: not valid java name */
public final ByteString m1991deprecated_encodeString(String str, Charset charset) {
Intrinsics.checkNotNullParameter(str, "string");
Intrinsics.checkNotNullParameter(charset, "charset");
Companion companion = this;
return encodeString(str, charset);
}
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to extension function", replaceWith = @ReplaceWith(expression = "string.encodeUtf8()", imports = {"okio.ByteString.Companion.encodeUtf8"}))
/* renamed from: -deprecated_encodeUtf8 reason: not valid java name */
public final ByteString m1992deprecated_encodeUtf8(String str) {
Intrinsics.checkNotNullParameter(str, "string");
Companion companion = this;
return encodeUtf8(str);
}
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to extension function", replaceWith = @ReplaceWith(expression = "buffer.toByteString()", imports = {"okio.ByteString.Companion.toByteString"}))
/* renamed from: -deprecated_of reason: not valid java name */
public final ByteString m1993deprecated_of(ByteBuffer byteBuffer) {
Intrinsics.checkNotNullParameter(byteBuffer, "buffer");
Companion companion = this;
return of(byteBuffer);
}
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to extension function", replaceWith = @ReplaceWith(expression = "array.toByteString(offset, byteCount)", imports = {"okio.ByteString.Companion.toByteString"}))
/* renamed from: -deprecated_of reason: not valid java name */
public final ByteString m1994deprecated_of(byte[] bArr, int i, int i2) {
Intrinsics.checkNotNullParameter(bArr, "array");
Companion companion = this;
return of(bArr, i, i2);
}
@Deprecated(level = DeprecationLevel.ERROR, message = "moved to extension function", replaceWith = @ReplaceWith(expression = "inputstream.readByteString(byteCount)", imports = {"okio.ByteString.Companion.readByteString"}))
/* renamed from: -deprecated_read reason: not valid java name */
public final ByteString m1995deprecated_read(InputStream inputStream, int i) {
Intrinsics.checkNotNullParameter(inputStream, "inputstream");
Companion companion = this;
return read(inputStream, i);
}
@JvmStatic
public final ByteString of(byte... bArr) {
Intrinsics.checkNotNullParameter(bArr, "data");
byte[] copyOf = Arrays.copyOf(bArr, bArr.length);
Intrinsics.checkNotNullExpressionValue(copyOf, "java.util.Arrays.copyOf(this, size)");
return new ByteString(copyOf);
}
@JvmStatic
public final ByteString of(byte[] bArr, int i, int i2) {
Intrinsics.checkNotNullParameter(bArr, "$this$toByteString");
Util.checkOffsetAndCount((long) bArr.length, (long) i, (long) i2);
return new ByteString(ArraysKt.copyOfRange(bArr, i, i2 + i));
}
@JvmStatic
public final ByteString encodeUtf8(String str) {
Intrinsics.checkNotNullParameter(str, "$this$encodeUtf8");
ByteString byteString = new ByteString(Platform.asUtf8ToByteArray(str));
byteString.setUtf8$okio(str);
return byteString;
}
@JvmStatic
public final ByteString decodeBase64(String str) {
Intrinsics.checkNotNullParameter(str, "$this$decodeBase64");
byte[] decodeBase64ToArray = Base64.decodeBase64ToArray(str);
if (decodeBase64ToArray != null) {
return new ByteString(decodeBase64ToArray);
}
return null;
}
@JvmStatic
public final ByteString decodeHex(String str) {
Intrinsics.checkNotNullParameter(str, "$this$decodeHex");
if (str.length() % 2 == 0) {
int length = str.length() / 2;
byte[] bArr = new byte[length];
for (int i = 0; i < length; i++) {
int i2 = i * 2;
bArr[i] = (byte) ((ByteStringKt.decodeHexDigit(str.charAt(i2)) << 4) + ByteStringKt.decodeHexDigit(str.charAt(i2 + 1)));
}
return new ByteString(bArr);
}
throw new IllegalArgumentException(("Unexpected hex string: " + str).toString());
}
}
public String utf8() {
String utf8$okio = getUtf8$okio();
if (utf8$okio != null) {
return utf8$okio;
}
String utf8String = Platform.toUtf8String(internalArray$okio());
setUtf8$okio(utf8String);
return utf8String;
}
public String base64() {
return Base64.encodeBase64$default(getData$okio(), (byte[]) null, 1, (Object) null);
}
public String base64Url() {
return Base64.encodeBase64(getData$okio(), Base64.getBASE64_URL_SAFE());
}
public String hex() {
char[] cArr = new char[(getData$okio().length * 2)];
int i = 0;
for (byte b : getData$okio()) {
int i2 = i + 1;
cArr[i] = ByteStringKt.getHEX_DIGIT_CHARS()[(b >> 4) & 15];
i = i2 + 1;
cArr[i2] = ByteStringKt.getHEX_DIGIT_CHARS()[b & Ascii.SI];
}
return new String(cArr);
}
public ByteString toAsciiLowercase() {
byte b;
int i = 0;
while (i < getData$okio().length) {
byte b2 = getData$okio()[i];
byte b3 = (byte) 65;
if (b2 < b3 || b2 > (b = (byte) 90)) {
i++;
} else {
byte[] data$okio = getData$okio();
byte[] copyOf = Arrays.copyOf(data$okio, data$okio.length);
Intrinsics.checkNotNullExpressionValue(copyOf, "java.util.Arrays.copyOf(this, size)");
copyOf[i] = (byte) (b2 + 32);
for (int i2 = i + 1; i2 < copyOf.length; i2++) {
byte b4 = copyOf[i2];
if (b4 >= b3 && b4 <= b) {
copyOf[i2] = (byte) (b4 + 32);
}
}
return new ByteString(copyOf);
}
}
return this;
}
public ByteString toAsciiUppercase() {
byte b;
int i = 0;
while (i < getData$okio().length) {
byte b2 = getData$okio()[i];
byte b3 = (byte) 97;
if (b2 < b3 || b2 > (b = (byte) 122)) {
i++;
} else {
byte[] data$okio = getData$okio();
byte[] copyOf = Arrays.copyOf(data$okio, data$okio.length);
Intrinsics.checkNotNullExpressionValue(copyOf, "java.util.Arrays.copyOf(this, size)");
copyOf[i] = (byte) (b2 - 32);
for (int i2 = i + 1; i2 < copyOf.length; i2++) {
byte b4 = copyOf[i2];
if (b4 >= b3 && b4 <= b) {
copyOf[i2] = (byte) (b4 - 32);
}
}
return new ByteString(copyOf);
}
}
return this;
}
public ByteString substring(int i, int i2) {
boolean z = true;
if (i >= 0) {
if (i2 <= getData$okio().length) {
if (i2 - i < 0) {
z = false;
}
if (!z) {
throw new IllegalArgumentException("endIndex < beginIndex".toString());
} else if (i == 0 && i2 == getData$okio().length) {
return this;
} else {
return new ByteString(ArraysKt.copyOfRange(getData$okio(), i, i2));
}
} else {
throw new IllegalArgumentException(("endIndex > length(" + getData$okio().length + ')').toString());
}
} else {
throw new IllegalArgumentException("beginIndex < 0".toString());
}
}
public byte internalGet$okio(int i) {
return getData$okio()[i];
}
public int getSize$okio() {
return getData$okio().length;
}
public byte[] toByteArray() {
byte[] data$okio = getData$okio();
byte[] copyOf = Arrays.copyOf(data$okio, data$okio.length);
Intrinsics.checkNotNullExpressionValue(copyOf, "java.util.Arrays.copyOf(this, size)");
return copyOf;
}
public byte[] internalArray$okio() {
return getData$okio();
}
public boolean rangeEquals(int i, ByteString byteString, int i2, int i3) {
Intrinsics.checkNotNullParameter(byteString, "other");
return byteString.rangeEquals(i2, getData$okio(), i, i3);
}
public boolean rangeEquals(int i, byte[] bArr, int i2, int i3) {
Intrinsics.checkNotNullParameter(bArr, "other");
return i >= 0 && i <= getData$okio().length - i3 && i2 >= 0 && i2 <= bArr.length - i3 && Util.arrayRangeEquals(getData$okio(), i, bArr, i2, i3);
}
public final boolean startsWith(ByteString byteString) {
Intrinsics.checkNotNullParameter(byteString, "prefix");
return rangeEquals(0, byteString, 0, byteString.size());
}
public final boolean startsWith(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "prefix");
return rangeEquals(0, bArr, 0, bArr.length);
}
public final boolean endsWith(ByteString byteString) {
Intrinsics.checkNotNullParameter(byteString, "suffix");
return rangeEquals(size() - byteString.size(), byteString, 0, byteString.size());
}
public final boolean endsWith(byte[] bArr) {
Intrinsics.checkNotNullParameter(bArr, "suffix");
return rangeEquals(size() - bArr.length, bArr, 0, bArr.length);
}
public int indexOf(byte[] bArr, int i) {
Intrinsics.checkNotNullParameter(bArr, "other");
int length = getData$okio().length - bArr.length;
int max = Math.max(i, 0);
if (max <= length) {
while (!Util.arrayRangeEquals(getData$okio(), max, bArr, 0, bArr.length)) {
if (max != length) {
max++;
}
}
return max;
}
return -1;
}
public final int lastIndexOf(ByteString byteString, int i) {
Intrinsics.checkNotNullParameter(byteString, "other");
return lastIndexOf(byteString.internalArray$okio(), i);
}
public int lastIndexOf(byte[] bArr, int i) {
Intrinsics.checkNotNullParameter(bArr, "other");
for (int min = Math.min(i, getData$okio().length - bArr.length); min >= 0; min--) {
if (Util.arrayRangeEquals(getData$okio(), min, bArr, 0, bArr.length)) {
return min;
}
}
return -1;
}
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (obj instanceof ByteString) {
ByteString byteString = (ByteString) obj;
return byteString.size() == getData$okio().length && byteString.rangeEquals(0, getData$okio(), 0, getData$okio().length);
}
}
public int hashCode() {
int hashCode$okio = getHashCode$okio();
if (hashCode$okio != 0) {
return hashCode$okio;
}
int hashCode2 = Arrays.hashCode(getData$okio());
setHashCode$okio(hashCode2);
return hashCode2;
}
/* JADX WARNING: Removed duplicated region for block: B:10:0x0032 A[ORIG_RETURN, RETURN, SYNTHETIC] */
/* JADX WARNING: Removed duplicated region for block: B:9:0x0030 A[RETURN, SYNTHETIC] */
/* Code decompiled incorrectly, please refer to instructions dump. */
public int compareTo(okio.ByteString r10) {
/*
r9 = this;
java.lang.String r0 = "other"
kotlin.jvm.internal.Intrinsics.checkNotNullParameter(r10, r0)
int r0 = r9.size()
int r1 = r10.size()
int r2 = java.lang.Math.min(r0, r1)
r3 = 0
r4 = 0
L_0x0013:
r5 = -1
r6 = 1
if (r4 >= r2) goto L_0x002b
byte r7 = r9.getByte(r4)
r7 = r7 & 255(0xff, float:3.57E-43)
byte r8 = r10.getByte(r4)
r8 = r8 & 255(0xff, float:3.57E-43)
if (r7 != r8) goto L_0x0028
int r4 = r4 + 1
goto L_0x0013
L_0x0028:
if (r7 >= r8) goto L_0x0032
goto L_0x0030
L_0x002b:
if (r0 != r1) goto L_0x002e
goto L_0x0033
L_0x002e:
if (r0 >= r1) goto L_0x0032
L_0x0030:
r3 = -1
goto L_0x0033
L_0x0032:
r3 = 1
L_0x0033:
return r3
*/
throw new UnsupportedOperationException("Method not decompiled: okio.ByteString.compareTo(okio.ByteString):int");
}
public String toString() {
ByteString byteString;
boolean z = true;
if (getData$okio().length == 0) {
return "[size=0]";
}
int access$codePointIndexToCharIndex = ByteStringKt.codePointIndexToCharIndex(getData$okio(), 64);
if (access$codePointIndexToCharIndex != -1) {
String utf82 = utf8();
Objects.requireNonNull(utf82, "null cannot be cast to non-null type java.lang.String");
String substring = utf82.substring(0, access$codePointIndexToCharIndex);
Intrinsics.checkNotNullExpressionValue(substring, "(this as java.lang.Strin…ing(startIndex, endIndex)");
String replace$default = StringsKt.replace$default(StringsKt.replace$default(StringsKt.replace$default(substring, "\\", "\\\\", false, 4, (Object) null), "\n", "\\n", false, 4, (Object) null), "\r", "\\r", false, 4, (Object) null);
if (access$codePointIndexToCharIndex < utf82.length()) {
return "[size=" + getData$okio().length + " text=" + replace$default + "…]";
}
return "[text=" + replace$default + ']';
} else if (getData$okio().length <= 64) {
return "[hex=" + hex() + ']';
} else {
StringBuilder sb = new StringBuilder();
sb.append("[size=");
sb.append(getData$okio().length);
sb.append(" hex=");
if (64 > getData$okio().length) {
z = false;
}
if (z) {
if (64 == getData$okio().length) {
byteString = this;
} else {
byteString = new ByteString(ArraysKt.copyOfRange(getData$okio(), 0, 64));
}
sb.append(byteString.hex());
sb.append("…]");
return sb.toString();
}
throw new IllegalArgumentException(("endIndex > length(" + getData$okio().length + ')').toString());
}
}
}
Download file