Files
rr3-apk/decompiled/sources/com/tapjoy/internal/f.java
Daniel Elliott f9d20bb3fc Add decompiled APK source code (JADX)
- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-18 14:52:23 -08:00

71 lines
2.3 KiB
Java

package com.tapjoy.internal;
import android.util.Base64;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.util.UUID;
import java.util.zip.CRC32;
/* loaded from: classes4.dex */
public final class f {
public final String a;
public final int b;
public final int c;
public final String d;
public final String e;
public f(String str) {
int length = str.length();
if (!str.matches("[A-Za-z0-9\\-_]*") || length < 60 || (length & 3) != 0) {
throw new IllegalArgumentException("The given API key was malformed.");
}
try {
byte[] decode = Base64.decode(str, 8);
int length2 = decode.length;
ByteBuffer wrap = ByteBuffer.wrap(decode);
wrap.order(ByteOrder.BIG_ENDIAN);
int length3 = decode.length - 4;
int i = wrap.getInt(length3);
CRC32 crc32 = new CRC32();
crc32.update(decode, 0, length3);
if (i != ((int) crc32.getValue())) {
throw new IllegalArgumentException("The given API key was invalid.");
}
this.a = str;
this.d = new UUID(wrap.getLong(0), wrap.getLong(8)).toString();
byte b = wrap.get(16);
this.b = b;
byte b2 = wrap.get(17);
int[] iArr = new int[1];
System.arraycopy(h0.a, 0, iArr, 0, 1);
int i2 = iArr[0];
if (i2 == 0) {
throw null;
}
int i3 = 2 == b2 ? i2 : 0;
this.c = i3;
this.e = str.substring(24, 44);
if (b == 2 && i3 == 1) {
if (length2 < 57) {
throw new IllegalArgumentException("The given API key was invalid.");
}
} else if (b != 1) {
throw new IllegalArgumentException("The given API key was not supported.");
}
} catch (IllegalArgumentException e) {
throw new IllegalArgumentException("The given API key was malformed.", e);
}
}
public final boolean equals(Object obj) {
if (obj instanceof f) {
return this.a.equals(((f) obj).a);
}
return false;
}
public final String toString() {
return this.a;
}
}