apkfuckery/com.discord/smali_classes2/okio/ByteString$a.smali

196 lines
3.9 KiB
Smali
Raw Normal View History

2020-05-17 12:40:10 +00:00
.class public final Lokio/ByteString$a;
.super Ljava/lang/Object;
.source "ByteString.kt"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lokio/ByteString;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "a"
.end annotation
# direct methods
2020-07-08 16:44:49 +00:00
.method public constructor <init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
2020-05-17 12:40:10 +00:00
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
2020-07-08 16:44:49 +00:00
.method public static c(Lokio/ByteString$a;[BIII)Lokio/ByteString;
2020-09-16 23:45:23 +00:00
.locals 6
2020-07-08 16:44:49 +00:00
and-int/lit8 p0, p4, 0x1
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
if-eqz p0, :cond_0
2020-05-17 12:40:10 +00:00
const/4 p2, 0x0
:cond_0
2020-07-08 16:44:49 +00:00
and-int/lit8 p0, p4, 0x2
2020-05-17 12:40:10 +00:00
2020-07-08 16:44:49 +00:00
if-eqz p0, :cond_1
2020-05-17 12:40:10 +00:00
array-length p3, p1
:cond_1
2020-09-16 23:45:23 +00:00
const-string p0, "$this$toByteString"
2020-10-05 23:18:16 +00:00
invoke-static {p1, p0}, Lc0/n/c/j;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2020-09-16 23:45:23 +00:00
2020-07-08 16:44:49 +00:00
array-length p0, p1
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
int-to-long v0, p0
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
int-to-long v2, p2
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
int-to-long v4, p3
2020-05-17 12:40:10 +00:00
2020-10-05 23:18:16 +00:00
invoke-static/range {v0 .. v5}, Lc0/j/a;->n(JJJ)V
2020-05-17 12:40:10 +00:00
2020-09-16 23:45:23 +00:00
add-int/2addr p3, p2
2020-05-17 12:40:10 +00:00
2020-10-05 23:18:16 +00:00
invoke-static {p1, p2, p3}, Lc0/i/f;->copyOfRange([BII)[B
2020-09-16 23:45:23 +00:00
move-result-object p0
2020-05-17 12:40:10 +00:00
new-instance p1, Lokio/ByteString;
2020-07-08 16:44:49 +00:00
invoke-direct {p1, p0}, Lokio/ByteString;-><init>([B)V
2020-05-17 12:40:10 +00:00
return-object p1
.end method
2020-07-08 16:44:49 +00:00
# virtual methods
.method public final a(Ljava/lang/String;)Lokio/ByteString;
2020-09-16 23:45:23 +00:00
.locals 5
2020-09-09 19:21:20 +00:00
2020-09-16 23:45:23 +00:00
const-string v0, "$this$decodeHex"
2020-09-09 19:21:20 +00:00
2020-10-05 23:18:16 +00:00
invoke-static {p1, v0}, Lc0/n/c/j;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2020-09-16 23:45:23 +00:00
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v0
rem-int/lit8 v0, v0, 0x2
const/4 v1, 0x0
if-nez v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
if-eqz v0, :cond_2
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v0
div-int/lit8 v0, v0, 0x2
new-array v2, v0, [B
:goto_1
if-ge v1, v0, :cond_1
mul-int/lit8 v3, v1, 0x2
invoke-virtual {p1, v3}, Ljava/lang/String;->charAt(I)C
move-result v4
2020-10-05 23:18:16 +00:00
invoke-static {v4}, Lh0/z/b;->a(C)I
2020-09-16 23:45:23 +00:00
move-result v4
shl-int/lit8 v4, v4, 0x4
add-int/lit8 v3, v3, 0x1
invoke-virtual {p1, v3}, Ljava/lang/String;->charAt(I)C
move-result v3
2020-10-05 23:18:16 +00:00
invoke-static {v3}, Lh0/z/b;->a(C)I
2020-09-16 23:45:23 +00:00
move-result v3
add-int/2addr v3, v4
int-to-byte v3, v3
aput-byte v3, v2, v1
add-int/lit8 v1, v1, 0x1
goto :goto_1
:cond_1
new-instance p1, Lokio/ByteString;
invoke-direct {p1, v2}, Lokio/ByteString;-><init>([B)V
2020-09-09 19:21:20 +00:00
2020-09-16 21:45:36 +00:00
return-object p1
2020-09-16 23:45:23 +00:00
:cond_2
const-string v0, "Unexpected hex string: "
2020-09-23 03:12:49 +00:00
invoke-static {v0, p1}, Lf/e/c/a/a;->q(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
2020-09-16 23:45:23 +00:00
move-result-object p1
new-instance v0, Ljava/lang/IllegalArgumentException;
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {v0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw v0
2020-05-17 12:40:10 +00:00
.end method
.method public final b(Ljava/lang/String;)Lokio/ByteString;
2020-09-16 23:45:23 +00:00
.locals 3
2020-09-09 19:21:20 +00:00
2020-09-16 23:45:23 +00:00
const-string v0, "$this$encodeUtf8"
2020-09-09 19:21:20 +00:00
2020-10-05 23:18:16 +00:00
invoke-static {p1, v0}, Lc0/n/c/j;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2020-09-09 19:21:20 +00:00
2020-09-16 23:45:23 +00:00
new-instance v0, Lokio/ByteString;
2020-09-09 19:21:20 +00:00
2020-09-16 23:45:23 +00:00
const-string v1, "$this$asUtf8ToByteArray"
2020-09-09 19:21:20 +00:00
2020-10-05 23:18:16 +00:00
invoke-static {p1, v1}, Lc0/n/c/j;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2020-09-16 23:45:23 +00:00
2020-10-05 23:18:16 +00:00
sget-object v1, Lc0/t/a;->a:Ljava/nio/charset/Charset;
2020-09-16 23:45:23 +00:00
invoke-virtual {p1, v1}, Ljava/lang/String;->getBytes(Ljava/nio/charset/Charset;)[B
move-result-object v1
const-string v2, "(this as java.lang.String).getBytes(charset)"
2020-10-05 23:18:16 +00:00
invoke-static {v1, v2}, Lc0/n/c/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2020-09-08 08:16:32 +00:00
2020-09-16 23:45:23 +00:00
invoke-direct {v0, v1}, Lokio/ByteString;-><init>([B)V
2020-09-08 08:16:32 +00:00
2020-09-16 23:45:23 +00:00
iput-object p1, v0, Lokio/ByteString;->e:Ljava/lang/String;
2020-09-08 08:16:32 +00:00
2020-09-16 23:45:23 +00:00
return-object v0
2020-05-17 12:40:10 +00:00
.end method