public class io.vertx.ext.auth.PRNG extends java.lang.Object implements io.vertx.ext.auth.VertxContextPRNG
{
private static final int DEFAULT_SEED_INTERVAL_MILLIS;
private static final int DEFAULT_SEED_BITS;
private final java.security.SecureRandom random;
private final long seedID;
private final io.vertx.core.Vertx vertx;
private volatile boolean dirty;
public void <init>(io.vertx.core.Vertx)
{
byte[] v;
io.vertx.ext.auth.PRNG v;
java.util.concurrent.atomic.AtomicBoolean v;
long v;
java.lang.Integer v, v;
java.security.SecureRandom v, v, v;
int v, v;
java.lang.String v;
io.vertx.core.Vertx v;
java.lang.RuntimeException v;
java.security.NoSuchAlgorithmException v;
io.vertx.core.Handler v;
v := @this: io.vertx.ext.auth.PRNG;
v := @parameter: io.vertx.core.Vertx;
specialinvoke v.<java.lang.Object: void <init>()>();
v.<io.vertx.ext.auth.PRNG: boolean dirty> = 0;
v.<io.vertx.ext.auth.PRNG: io.vertx.core.Vertx vertx> = v;
v = staticinvoke <java.lang.System: java.lang.String getProperty(java.lang.String)>("io.vertx.ext.auth.prng.algorithm");
v = staticinvoke <java.lang.Integer: java.lang.Integer getInteger(java.lang.String,int)>("io.vertx.ext.auth.prng.seed.interval", 300000);
v = virtualinvoke v.<java.lang.Integer: int intValue()>();
v = staticinvoke <java.lang.Integer: java.lang.Integer getInteger(java.lang.String,int)>("io.vertx.ext.auth.prng.seed.bits", 64);
v = virtualinvoke v.<java.lang.Integer: int intValue()>();
if v == null goto label;
label:
v = staticinvoke <java.security.SecureRandom: java.security.SecureRandom getInstance(java.lang.String)>(v);
v.<io.vertx.ext.auth.PRNG: java.security.SecureRandom random> = v;
label:
goto label;
label:
v := @caughtexception;
v = new java.lang.RuntimeException;
specialinvoke v.<java.lang.RuntimeException: void <init>(java.lang.Throwable)>(v);
throw v;
label:
v = new java.security.SecureRandom;
specialinvoke v.<java.security.SecureRandom: void <init>()>();
v.<io.vertx.ext.auth.PRNG: java.security.SecureRandom random> = v;
label:
v = v.<io.vertx.ext.auth.PRNG: java.security.SecureRandom random>;
v = newarray (byte)[1];
virtualinvoke v.<java.security.SecureRandom: void nextBytes(byte[])>(v);
if v <= 0 goto label;
if v <= 0 goto label;
v = new java.util.concurrent.atomic.AtomicBoolean;
specialinvoke v.<java.util.concurrent.atomic.AtomicBoolean: void <init>(boolean)>(0);
v = staticinvoke <io.vertx.ext.auth.PRNG$lambda_new_2__870: io.vertx.core.Handler bootstrap$(io.vertx.ext.auth.PRNG,java.util.concurrent.atomic.AtomicBoolean,io.vertx.core.Vertx,int)>(v, v, v, v);
v = interfaceinvoke v.<io.vertx.core.Vertx: long setPeriodic(long,io.vertx.core.Handler)>(v, v);
v.<io.vertx.ext.auth.PRNG: long seedID> = v;
goto label;
label:
v.<io.vertx.ext.auth.PRNG: long seedID> = -1L;
label:
return;
catch java.security.NoSuchAlgorithmException from label to label with label;
}
public void close()
{
byte v;
io.vertx.ext.auth.PRNG v;
io.vertx.core.Vertx v;
long v, v;
v := @this: io.vertx.ext.auth.PRNG;
v = v.<io.vertx.ext.auth.PRNG: long seedID>;
v = v cmp -1L;
if v == 0 goto label;
v = v.<io.vertx.ext.auth.PRNG: io.vertx.core.Vertx vertx>;
v = v.<io.vertx.ext.auth.PRNG: long seedID>;
interfaceinvoke v.<io.vertx.core.Vertx: boolean cancelTimer(long)>(v);
label:
return;
}
public void nextBytes(byte[])
{
java.security.SecureRandom v;
byte[] v;
io.vertx.ext.auth.PRNG v;
v := @this: io.vertx.ext.auth.PRNG;
v := @parameter: byte[];
if v == null goto label;
v = v.<io.vertx.ext.auth.PRNG: java.security.SecureRandom random>;
virtualinvoke v.<java.security.SecureRandom: void nextBytes(byte[])>(v);
v.<io.vertx.ext.auth.PRNG: boolean dirty> = 1;
label:
return;
}
public int nextInt()
{
java.lang.Throwable v;
java.security.SecureRandom v;
io.vertx.ext.auth.PRNG v;
int v;
v := @this: io.vertx.ext.auth.PRNG;
label:
v = v.<io.vertx.ext.auth.PRNG: java.security.SecureRandom random>;
v = virtualinvoke v.<java.security.SecureRandom: int nextInt()>();
label:
v.<io.vertx.ext.auth.PRNG: boolean dirty> = 1;
return v;
label:
v := @caughtexception;
v.<io.vertx.ext.auth.PRNG: boolean dirty> = 1;
throw v;
catch java.lang.Throwable from label to label with label;
}
public int nextInt(int)
{
java.lang.Throwable v;
java.security.SecureRandom v;
io.vertx.ext.auth.PRNG v;
int v, v;
v := @this: io.vertx.ext.auth.PRNG;
v := @parameter: int;
label:
v = v.<io.vertx.ext.auth.PRNG: java.security.SecureRandom random>;
v = virtualinvoke v.<java.security.SecureRandom: int nextInt(int)>(v);
label:
v.<io.vertx.ext.auth.PRNG: boolean dirty> = 1;
return v;
label:
v := @caughtexception;
v.<io.vertx.ext.auth.PRNG: boolean dirty> = 1;
throw v;
catch java.lang.Throwable from label to label with label;
}
public boolean nextBoolean()
{
java.lang.Throwable v;
java.security.SecureRandom v;
io.vertx.ext.auth.PRNG v;
boolean v;
v := @this: io.vertx.ext.auth.PRNG;
label:
v = v.<io.vertx.ext.auth.PRNG: java.security.SecureRandom random>;
v = virtualinvoke v.<java.security.SecureRandom: boolean nextBoolean()>();
label:
v.<io.vertx.ext.auth.PRNG: boolean dirty> = 1;
return v;
label:
v := @caughtexception;
v.<io.vertx.ext.auth.PRNG: boolean dirty> = 1;
throw v;
catch java.lang.Throwable from label to label with label;
}
public long nextLong()
{
java.lang.Throwable v;
java.security.SecureRandom v;
io.vertx.ext.auth.PRNG v;
long v;
v := @this: io.vertx.ext.auth.PRNG;
label:
v = v.<io.vertx.ext.auth.PRNG: java.security.SecureRandom random>;
v = virtualinvoke v.<java.security.SecureRandom: long nextLong()>();
label:
v.<io.vertx.ext.auth.PRNG: boolean dirty> = 1;
return v;
label:
v := @caughtexception;
v.<io.vertx.ext.auth.PRNG: boolean dirty> = 1;
throw v;
catch java.lang.Throwable from label to label with label;
}
public float nextFloat()
{
java.lang.Throwable v;
java.security.SecureRandom v;
io.vertx.ext.auth.PRNG v;
float v;
v := @this: io.vertx.ext.auth.PRNG;
label:
v = v.<io.vertx.ext.auth.PRNG: java.security.SecureRandom random>;
v = virtualinvoke v.<java.security.SecureRandom: float nextFloat()>();
label:
v.<io.vertx.ext.auth.PRNG: boolean dirty> = 1;
return v;
label:
v := @caughtexception;
v.<io.vertx.ext.auth.PRNG: boolean dirty> = 1;
throw v;
catch java.lang.Throwable from label to label with label;
}
public double nextDouble()
{
java.lang.Throwable v;
java.security.SecureRandom v;
io.vertx.ext.auth.PRNG v;
double v;
v := @this: io.vertx.ext.auth.PRNG;
label:
v = v.<io.vertx.ext.auth.PRNG: java.security.SecureRandom random>;
v = virtualinvoke v.<java.security.SecureRandom: double nextDouble()>();
label:
v.<io.vertx.ext.auth.PRNG: boolean dirty> = 1;
return v;
label:
v := @caughtexception;
v.<io.vertx.ext.auth.PRNG: boolean dirty> = 1;
throw v;
catch java.lang.Throwable from label to label with label;
}
public double nextGaussian()
{
java.lang.Throwable v;
java.security.SecureRandom v;
io.vertx.ext.auth.PRNG v;
double v;
v := @this: io.vertx.ext.auth.PRNG;
label:
v = v.<io.vertx.ext.auth.PRNG: java.security.SecureRandom random>;
v = virtualinvoke v.<java.security.SecureRandom: double nextGaussian()>();
label:
v.<io.vertx.ext.auth.PRNG: boolean dirty> = 1;
return v;
label:
v := @caughtexception;
v.<io.vertx.ext.auth.PRNG: boolean dirty> = 1;
throw v;
catch java.lang.Throwable from label to label with label;
}
public java.lang.String nextString(int)
{
byte[] v;
io.vertx.ext.auth.PRNG v;
int v;
java.lang.String v;
v := @this: io.vertx.ext.auth.PRNG;
v := @parameter: int;
v = newarray (byte)[v];
virtualinvoke v.<io.vertx.ext.auth.PRNG: void nextBytes(byte[])>(v);
v = staticinvoke <io.vertx.ext.auth.impl.Codec: java.lang.String base64UrlEncode(byte[])>(v);
return v;
}
}