Files
rr3-apk/decompiled-community/sources/com/google/firebase/crashlytics/internal/common/CLSUUID.java
Daniel Elliott c080f0d97f Add Discord community version (64-bit only)
- Added realracing3-community.apk (71.57 MB)
- Removed 32-bit support (armeabi-v7a)
- Only includes arm64-v8a libraries
- Decompiled source code included
- Added README-community.md with analysis
2026-02-18 15:48:36 -08:00

70 lines
2.6 KiB
Java

package com.google.firebase.crashlytics.internal.common;
import android.os.Process;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.util.Date;
import java.util.Locale;
import java.util.concurrent.atomic.AtomicLong;
/* loaded from: classes3.dex */
public class CLSUUID {
public static String _clsId;
public static final AtomicLong _sequenceNumber = new AtomicLong(0);
public String toString() {
return _clsId;
}
public CLSUUID(IdManager idManager) {
byte[] bArr = new byte[10];
populateTime(bArr);
populateSequenceNumber(bArr);
populatePID(bArr);
String sha1 = CommonUtils.sha1(idManager.getInstallIds().getCrashlyticsInstallId());
String hexify = CommonUtils.hexify(bArr);
Locale locale = Locale.US;
_clsId = String.format(locale, "%s%s%s%s", hexify.substring(0, 12), hexify.substring(12, 16), hexify.subSequence(16, 20), sha1.substring(0, 12)).toUpperCase(locale);
}
public final void populateTime(byte[] bArr) {
long time = new Date().getTime();
byte[] convertLongToFourByteBuffer = convertLongToFourByteBuffer(time / 1000);
bArr[0] = convertLongToFourByteBuffer[0];
bArr[1] = convertLongToFourByteBuffer[1];
bArr[2] = convertLongToFourByteBuffer[2];
bArr[3] = convertLongToFourByteBuffer[3];
byte[] convertLongToTwoByteBuffer = convertLongToTwoByteBuffer(time % 1000);
bArr[4] = convertLongToTwoByteBuffer[0];
bArr[5] = convertLongToTwoByteBuffer[1];
}
public final void populateSequenceNumber(byte[] bArr) {
byte[] convertLongToTwoByteBuffer = convertLongToTwoByteBuffer(_sequenceNumber.incrementAndGet());
bArr[6] = convertLongToTwoByteBuffer[0];
bArr[7] = convertLongToTwoByteBuffer[1];
}
public final void populatePID(byte[] bArr) {
byte[] convertLongToTwoByteBuffer = convertLongToTwoByteBuffer(Integer.valueOf(Process.myPid()).shortValue());
bArr[8] = convertLongToTwoByteBuffer[0];
bArr[9] = convertLongToTwoByteBuffer[1];
}
public static byte[] convertLongToFourByteBuffer(long j) {
ByteBuffer allocate = ByteBuffer.allocate(4);
allocate.putInt((int) j);
allocate.order(ByteOrder.BIG_ENDIAN);
allocate.position(0);
return allocate.array();
}
public static byte[] convertLongToTwoByteBuffer(long j) {
ByteBuffer allocate = ByteBuffer.allocate(2);
allocate.putShort((short) j);
allocate.order(ByteOrder.BIG_ENDIAN);
allocate.position(0);
return allocate.array();
}
}