63 lines
1.4 KiB
Java
63 lines
1.4 KiB
Java
import java.security.SecureRandom;
|
|
import java.util.concurrent.ExecutorService;
|
|
import java.util.concurrent.Executors;
|
|
import java.util.concurrent.Future;
|
|
import net.runelite.mapping.Export;
|
|
import net.runelite.mapping.Implements;
|
|
import net.runelite.mapping.ObfuscatedName;
|
|
import net.runelite.mapping.ObfuscatedSignature;
|
|
|
|
@ObfuscatedName("co")
|
|
@Implements("SecureRandomFuture")
|
|
public class SecureRandomFuture {
|
|
@ObfuscatedName("q")
|
|
@Export("SpriteBuffer_xOffsets")
|
|
public static int[] SpriteBuffer_xOffsets;
|
|
@ObfuscatedName("a")
|
|
@Export("executor")
|
|
ExecutorService executor;
|
|
@ObfuscatedName("t")
|
|
@Export("future")
|
|
Future future;
|
|
|
|
SecureRandomFuture() {
|
|
this.executor = Executors.newSingleThreadExecutor();
|
|
this.future = this.executor.submit(new SecureRandomCallable());
|
|
}
|
|
|
|
@ObfuscatedName("a")
|
|
@ObfuscatedSignature(
|
|
signature = "(I)V",
|
|
garbageValue = "824065163"
|
|
)
|
|
@Export("shutdown")
|
|
void shutdown() {
|
|
this.executor.shutdown();
|
|
this.executor = null;
|
|
}
|
|
|
|
@ObfuscatedName("t")
|
|
@ObfuscatedSignature(
|
|
signature = "(B)Z",
|
|
garbageValue = "-58"
|
|
)
|
|
@Export("isDone")
|
|
boolean isDone() {
|
|
return this.future.isDone();
|
|
}
|
|
|
|
@ObfuscatedName("n")
|
|
@ObfuscatedSignature(
|
|
signature = "(I)Ljava/security/SecureRandom;",
|
|
garbageValue = "2107000562"
|
|
)
|
|
@Export("get")
|
|
SecureRandom get() {
|
|
try {
|
|
return (SecureRandom)this.future.get();
|
|
} catch (Exception var2) {
|
|
return Language.method3800();
|
|
}
|
|
}
|
|
}
|