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

196 lines
3.9 KiB
Smali
Raw Normal View History

2020-11-12 02:11:44 +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
.method public constructor <init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
.locals 0
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static c(Lokio/ByteString$a;[BIII)Lokio/ByteString;
.locals 6
and-int/lit8 p0, p4, 0x1
if-eqz p0, :cond_0
const/4 p2, 0x0
:cond_0
and-int/lit8 p0, p4, 0x2
if-eqz p0, :cond_1
array-length p3, p1
:cond_1
const-string p0, "$this$toByteString"
2020-11-16 01:00:50 +00:00
invoke-static {p1, p0}, Lz/n/c/j;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2020-11-12 02:11:44 +00:00
array-length p0, p1
int-to-long v0, p0
int-to-long v2, p2
int-to-long v4, p3
2020-11-16 01:00:50 +00:00
invoke-static/range {v0 .. v5}, Lz/i/s;->n(JJJ)V
2020-11-12 02:11:44 +00:00
add-int/2addr p3, p2
2020-11-16 01:00:50 +00:00
invoke-static {p1, p2, p3}, Lz/i/f;->copyOfRange([BII)[B
2020-11-12 02:11:44 +00:00
move-result-object p0
new-instance p1, Lokio/ByteString;
invoke-direct {p1, p0}, Lokio/ByteString;-><init>([B)V
return-object p1
.end method
# virtual methods
.method public final a(Ljava/lang/String;)Lokio/ByteString;
.locals 5
const-string v0, "$this$decodeHex"
2020-11-16 01:00:50 +00:00
invoke-static {p1, v0}, Lz/n/c/j;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2020-11-12 02:11:44 +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-11-16 01:00:50 +00:00
invoke-static {v4}, Le0/z/b;->a(C)I
2020-11-12 02:11:44 +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-11-16 01:00:50 +00:00
invoke-static {v3}, Le0/z/b;->a(C)I
2020-11-12 02:11:44 +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
return-object p1
:cond_2
const-string v0, "Unexpected hex string: "
2020-11-16 01:00:50 +00:00
invoke-static {v0, p1}, Lf/e/c/a/a;->q(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
2020-11-12 02:11:44 +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
.end method
.method public final b(Ljava/lang/String;)Lokio/ByteString;
.locals 3
const-string v0, "$this$encodeUtf8"
2020-11-16 01:00:50 +00:00
invoke-static {p1, v0}, Lz/n/c/j;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2020-11-12 02:11:44 +00:00
new-instance v0, Lokio/ByteString;
const-string v1, "$this$asUtf8ToByteArray"
2020-11-16 01:00:50 +00:00
invoke-static {p1, v1}, Lz/n/c/j;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2020-11-12 02:11:44 +00:00
2020-11-16 01:00:50 +00:00
sget-object v1, Lz/t/a;->a:Ljava/nio/charset/Charset;
2020-11-12 02:11:44 +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-11-16 01:00:50 +00:00
invoke-static {v1, v2}, Lz/n/c/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2020-11-12 02:11:44 +00:00
invoke-direct {v0, v1}, Lokio/ByteString;-><init>([B)V
iput-object p1, v0, Lokio/ByteString;->e:Ljava/lang/String;
return-object v0
.end method