2020-11-12 02:11:44 +00:00
|
|
|
.class public final Lcom/discord/utilities/users/UserUtils;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "UserUtils.kt"
|
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
|
|
|
.field public static final INSTANCE:Lcom/discord/utilities/users/UserUtils;
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public static constructor <clinit>()V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/utilities/users/UserUtils;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Lcom/discord/utilities/users/UserUtils;-><init>()V
|
|
|
|
|
|
|
|
sput-object v0, Lcom/discord/utilities/users/UserUtils;->INSTANCE:Lcom/discord/utilities/users/UserUtils;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2020-11-16 22:05:17 +00:00
|
|
|
.method private constructor <init>()V
|
2020-11-12 02:11:44 +00:00
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public final getObfuscatedUserId(Ljava/lang/Long;)Ljava/lang/String;
|
|
|
|
.locals 7
|
|
|
|
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const-string v0, "SHA-256"
|
|
|
|
|
|
|
|
invoke-static {v0}, Ljava/security/MessageDigest;->getInstance(Ljava/lang/String;)Ljava/security/MessageDigest;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Long;->longValue()J
|
|
|
|
|
|
|
|
move-result-wide v1
|
|
|
|
|
|
|
|
invoke-static {v1, v2}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2020-11-16 22:05:17 +00:00
|
|
|
sget-object v1, Ly/s/a;->a:Ljava/nio/charset/Charset;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-16 22:05:17 +00:00
|
|
|
const-string v2, "null cannot be cast to non-null type java.lang.String"
|
|
|
|
|
|
|
|
invoke-static {p1, v2}, Ljava/util/Objects;->requireNonNull(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1, v1}, Ljava/lang/String;->getBytes(Ljava/nio/charset/Charset;)[B
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string v1, "(this as java.lang.String).getBytes(charset)"
|
|
|
|
|
2020-11-16 22:05:17 +00:00
|
|
|
invoke-static {p1, v1}, Ly/m/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
invoke-virtual {v0, p1}, Ljava/security/MessageDigest;->digest([B)[B
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string v0, "MessageDigest\n .g\u2026toString().toByteArray())"
|
|
|
|
|
2020-11-16 22:05:17 +00:00
|
|
|
invoke-static {p1, v0}, Ly/m/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
array-length v0, p1
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
const-string v2, ""
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
if-ge v3, v0, :cond_1
|
|
|
|
|
|
|
|
aget-byte v4, p1, v3
|
|
|
|
|
2020-11-20 01:16:14 +00:00
|
|
|
invoke-static {v2}, Lf/e/c/a/a;->F(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
const/4 v5, 0x1
|
|
|
|
|
|
|
|
new-array v6, v5, [Ljava/lang/Object;
|
|
|
|
|
|
|
|
invoke-static {v4}, Ljava/lang/Byte;->valueOf(B)Ljava/lang/Byte;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
aput-object v4, v6, v1
|
|
|
|
|
|
|
|
invoke-static {v6, v5}, Ljava/util/Arrays;->copyOf([Ljava/lang/Object;I)[Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
const-string v5, "%02x"
|
|
|
|
|
|
|
|
invoke-static {v5, v4}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
const-string v5, "java.lang.String.format(this, *args)"
|
|
|
|
|
2020-11-16 22:05:17 +00:00
|
|
|
invoke-static {v4, v5}, Ly/m/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
invoke-virtual {v2, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
add-int/lit8 v3, v3, 0x1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
return-object v2
|
|
|
|
.end method
|