class sun.security.provider.NativePRNG$RandomIO
minor version: 0
major version: 59
flags: flags: (0x0020) ACC_SUPER
this_class: sun.security.provider.NativePRNG$RandomIO
super_class: java.lang.Object
{
private static final long MAX_BUFFER_TIME;
descriptor: J
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 100
private static final int BUFFER_SIZE;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 32
private final java.io.InputStream randomIn;
descriptor: Ljava/io/InputStream;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.io.InputStream urandomIn;
descriptor: Ljava/io/InputStream;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private java.io.OutputStream randomOut;
descriptor: Ljava/io/OutputStream;
flags: (0x0002) ACC_PRIVATE
private boolean randomOutInitialized;
descriptor: Z
flags: (0x0002) ACC_PRIVATE
private volatile sun.security.provider.SecureRandom mixRandom;
descriptor: Lsun/security/provider/SecureRandom;
flags: (0x0042) ACC_PRIVATE, ACC_VOLATILE
private final byte[] urandomBuffer;
descriptor: [B
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private int buffered;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private long lastRead;
descriptor: J
flags: (0x0002) ACC_PRIVATE
private final java.lang.Object LOCK_GET_BYTES;
descriptor: Ljava/lang/Object;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.lang.Object LOCK_GET_SEED;
descriptor: Ljava/lang/Object;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.lang.Object LOCK_SET_SEED;
descriptor: Ljava/lang/Object;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private void <init>(java.io.File, java.io.File);
descriptor: (Ljava/io/File;Ljava/io/File;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new java.lang.Object
dup
invokespecial java.lang.Object.<init>:()V
putfield sun.security.provider.NativePRNG$RandomIO.LOCK_GET_BYTES:Ljava/lang/Object;
2: aload 0
new java.lang.Object
dup
invokespecial java.lang.Object.<init>:()V
putfield sun.security.provider.NativePRNG$RandomIO.LOCK_GET_SEED:Ljava/lang/Object;
3: aload 0
new java.lang.Object
dup
invokespecial java.lang.Object.<init>:()V
putfield sun.security.provider.NativePRNG$RandomIO.LOCK_SET_SEED:Ljava/lang/Object;
4: aload 0
new java.io.FileInputStream
dup
aload 1
invokespecial java.io.FileInputStream.<init>:(Ljava/io/File;)V
putfield sun.security.provider.NativePRNG$RandomIO.randomIn:Ljava/io/InputStream;
5: aload 0
new java.io.FileInputStream
dup
aload 2
invokespecial java.io.FileInputStream.<init>:(Ljava/io/File;)V
putfield sun.security.provider.NativePRNG$RandomIO.urandomIn:Ljava/io/InputStream;
6: aload 0
bipush 32
newarray 8
putfield sun.security.provider.NativePRNG$RandomIO.urandomBuffer:[B
7: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lsun/security/provider/NativePRNG$RandomIO;
0 8 1 randomFile Ljava/io/File;
0 8 2 urandomFile Ljava/io/File;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
randomFile
urandomFile
private sun.security.provider.SecureRandom getMixRandom();
descriptor: ()Lsun/security/provider/SecureRandom;
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=4, args_size=1
start local 0 0: aload 0
getfield sun.security.provider.NativePRNG$RandomIO.mixRandom:Lsun/security/provider/SecureRandom;
astore 1
start local 1 1: aload 1
ifnonnull 17
2: aload 0
getfield sun.security.provider.NativePRNG$RandomIO.LOCK_GET_BYTES:Ljava/lang/Object;
dup
astore 2
monitorenter
3: aload 0
getfield sun.security.provider.NativePRNG$RandomIO.mixRandom:Lsun/security/provider/SecureRandom;
astore 1
4: aload 1
ifnonnull 13
5: new sun.security.provider.SecureRandom
dup
invokespecial sun.security.provider.SecureRandom.<init>:()V
astore 1
6: bipush 20
newarray 8
astore 3
start local 3 7: aload 0
getfield sun.security.provider.NativePRNG$RandomIO.urandomIn:Ljava/io/InputStream;
aload 3
invokestatic sun.security.provider.NativePRNG$RandomIO.readFully:(Ljava/io/InputStream;[B)V
8: aload 1
aload 3
invokevirtual sun.security.provider.SecureRandom.engineSetSeed:([B)V
end local 3 9: goto 12
StackMap locals: sun.security.provider.NativePRNG$RandomIO sun.security.provider.SecureRandom java.lang.Object
StackMap stack: java.io.IOException
10: astore 3
start local 3 11: new java.security.ProviderException
dup
ldc "init failed"
aload 3
invokespecial java.security.ProviderException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 3 12: StackMap locals:
StackMap stack:
aload 0
aload 1
putfield sun.security.provider.NativePRNG$RandomIO.mixRandom:Lsun/security/provider/SecureRandom;
13: StackMap locals:
StackMap stack:
aload 2
monitorexit
14: goto 17
StackMap locals:
StackMap stack: java.lang.Throwable
15: aload 2
monitorexit
16: athrow
17: StackMap locals:
StackMap stack:
aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 18 0 this Lsun/security/provider/NativePRNG$RandomIO;
1 18 1 r Lsun/security/provider/SecureRandom;
7 9 3 b [B
11 12 3 e Ljava/io/IOException;
Exception table:
from to target type
6 9 10 Class java.io.IOException
3 14 15 any
15 16 15 any
private static void readFully(java.io.InputStream, byte[]);
descriptor: (Ljava/io/InputStream;[B)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=4, locals=5, args_size=2
start local 0 start local 1 0: aload 1
arraylength
istore 2
start local 2 1: iconst_0
istore 3
start local 3 2: goto 8
3: StackMap locals: int int
StackMap stack:
aload 0
aload 1
iload 3
iload 2
invokevirtual java.io.InputStream.read:([BII)I
istore 4
start local 4 4: iload 4
ifgt 6
5: new java.io.EOFException
dup
ldc "/dev/[u]random closed?"
invokespecial java.io.EOFException.<init>:(Ljava/lang/String;)V
athrow
6: StackMap locals: int
StackMap stack:
iload 3
iload 4
iadd
istore 3
7: iload 2
iload 4
isub
istore 2
end local 4 8: StackMap locals:
StackMap stack:
iload 2
ifgt 3
9: iload 2
ifle 11
10: new java.io.IOException
dup
ldc "Could not read from /dev/[u]random"
invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
11: StackMap locals:
StackMap stack:
return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 in Ljava/io/InputStream;
0 12 1 data [B
1 12 2 len I
2 12 3 ofs I
4 8 4 k I
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
in
data
private byte[] implGenerateSeed(int);
descriptor: (I)[B
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=4, args_size=2
start local 0 start local 1 0: aload 0
getfield sun.security.provider.NativePRNG$RandomIO.LOCK_GET_SEED:Ljava/lang/Object;
dup
astore 2
monitorenter
1: iload 1
newarray 8
astore 3
start local 3 2: aload 0
getfield sun.security.provider.NativePRNG$RandomIO.randomIn:Ljava/io/InputStream;
aload 3
invokestatic sun.security.provider.NativePRNG$RandomIO.readFully:(Ljava/io/InputStream;[B)V
3: aload 3
4: aload 2
monitorexit
5: areturn
end local 3 6: StackMap locals: sun.security.provider.NativePRNG$RandomIO int java.lang.Object
StackMap stack: java.io.IOException
astore 3
start local 3 7: new java.security.ProviderException
dup
ldc "generateSeed() failed"
aload 3
invokespecial java.security.ProviderException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 3 8: StackMap locals:
StackMap stack: java.lang.Throwable
aload 2
monitorexit
9: athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lsun/security/provider/NativePRNG$RandomIO;
0 10 1 numBytes I
2 6 3 b [B
7 8 3 e Ljava/io/IOException;
Exception table:
from to target type
1 4 6 Class java.io.IOException
1 5 8 any
6 9 8 any
MethodParameters:
Name Flags
numBytes
private void implSetSeed(byte[]);
descriptor: ([B)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=4, args_size=2
start local 0 start local 1 0: aload 0
getfield sun.security.provider.NativePRNG$RandomIO.LOCK_SET_SEED:Ljava/lang/Object;
dup
astore 2
monitorenter
1: aload 0
getfield sun.security.provider.NativePRNG$RandomIO.randomOutInitialized:Z
ifne 6
2: aload 0
iconst_1
putfield sun.security.provider.NativePRNG$RandomIO.randomOutInitialized:Z
3: aload 0
4: new sun.security.provider.NativePRNG$RandomIO$1
dup
aload 0
invokespecial sun.security.provider.NativePRNG$RandomIO$1.<init>:(Lsun/security/provider/NativePRNG$RandomIO;)V
5: invokestatic java.security.AccessController.doPrivileged:(Ljava/security/PrivilegedAction;)Ljava/lang/Object;
checkcast java.io.OutputStream
putfield sun.security.provider.NativePRNG$RandomIO.randomOut:Ljava/io/OutputStream;
6: StackMap locals: java.lang.Object
StackMap stack:
aload 0
getfield sun.security.provider.NativePRNG$RandomIO.randomOut:Ljava/io/OutputStream;
ifnull 11
7: aload 0
getfield sun.security.provider.NativePRNG$RandomIO.randomOut:Ljava/io/OutputStream;
aload 1
invokevirtual java.io.OutputStream.write:([B)V
8: goto 11
StackMap locals:
StackMap stack: java.io.IOException
9: astore 3
start local 3 10: new java.security.ProviderException
dup
ldc "setSeed() failed"
aload 3
invokespecial java.security.ProviderException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 3 11: StackMap locals:
StackMap stack:
aload 0
invokevirtual sun.security.provider.NativePRNG$RandomIO.getMixRandom:()Lsun/security/provider/SecureRandom;
aload 1
invokevirtual sun.security.provider.SecureRandom.engineSetSeed:([B)V
12: aload 2
monitorexit
13: goto 16
StackMap locals:
StackMap stack: java.lang.Throwable
14: aload 2
monitorexit
15: athrow
16: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 17 0 this Lsun/security/provider/NativePRNG$RandomIO;
0 17 1 seed [B
10 11 3 e Ljava/io/IOException;
Exception table:
from to target type
7 8 9 Class java.io.IOException
1 13 14 any
14 15 14 any
MethodParameters:
Name Flags
seed
private void ensureBufferValid();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=3, args_size=1
start local 0 0: invokestatic java.lang.System.currentTimeMillis:()J
lstore 1
start local 1 1: aload 0
getfield sun.security.provider.NativePRNG$RandomIO.buffered:I
ifle 3
lload 1
aload 0
getfield sun.security.provider.NativePRNG$RandomIO.lastRead:J
lsub
ldc 100
lcmp
ifge 3
2: return
3: StackMap locals: long
StackMap stack:
aload 0
lload 1
putfield sun.security.provider.NativePRNG$RandomIO.lastRead:J
4: aload 0
getfield sun.security.provider.NativePRNG$RandomIO.urandomIn:Ljava/io/InputStream;
aload 0
getfield sun.security.provider.NativePRNG$RandomIO.urandomBuffer:[B
invokestatic sun.security.provider.NativePRNG$RandomIO.readFully:(Ljava/io/InputStream;[B)V
5: aload 0
aload 0
getfield sun.security.provider.NativePRNG$RandomIO.urandomBuffer:[B
arraylength
putfield sun.security.provider.NativePRNG$RandomIO.buffered:I
6: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lsun/security/provider/NativePRNG$RandomIO;
1 7 1 time J
Exceptions:
throws java.io.IOException
private void implNextBytes(byte[]);
descriptor: ([B)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=6, args_size=2
start local 0 start local 1 0: aload 0
getfield sun.security.provider.NativePRNG$RandomIO.LOCK_GET_BYTES:Ljava/lang/Object;
dup
astore 2
monitorenter
1: aload 0
invokevirtual sun.security.provider.NativePRNG$RandomIO.getMixRandom:()Lsun/security/provider/SecureRandom;
aload 1
invokevirtual sun.security.provider.SecureRandom.engineNextBytes:([B)V
2: aload 1
arraylength
istore 3
start local 3 3: iconst_0
istore 4
start local 4 4: goto 12
5: StackMap locals: java.lang.Object int int
StackMap stack:
aload 0
invokevirtual sun.security.provider.NativePRNG$RandomIO.ensureBufferValid:()V
6: aload 0
getfield sun.security.provider.NativePRNG$RandomIO.urandomBuffer:[B
arraylength
aload 0
getfield sun.security.provider.NativePRNG$RandomIO.buffered:I
isub
istore 5
start local 5 7: goto 11
8: StackMap locals: int
StackMap stack:
aload 1
iload 4
iinc 4 1
dup2
baload
aload 0
getfield sun.security.provider.NativePRNG$RandomIO.urandomBuffer:[B
iload 5
iinc 5 1
baload
ixor
i2b
bastore
9: iinc 3 -1
10: aload 0
dup
getfield sun.security.provider.NativePRNG$RandomIO.buffered:I
iconst_1
isub
putfield sun.security.provider.NativePRNG$RandomIO.buffered:I
11: StackMap locals:
StackMap stack:
iload 3
ifle 12
aload 0
getfield sun.security.provider.NativePRNG$RandomIO.buffered:I
ifgt 8
end local 5 12: StackMap locals:
StackMap stack:
iload 3
ifgt 5
end local 4 end local 3 13: goto 16
StackMap locals: sun.security.provider.NativePRNG$RandomIO byte[] java.lang.Object
StackMap stack: java.io.IOException
14: astore 3
start local 3 15: new java.security.ProviderException
dup
ldc "nextBytes() failed"
aload 3
invokespecial java.security.ProviderException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 3 16: StackMap locals:
StackMap stack:
aload 2
monitorexit
17: goto 20
StackMap locals:
StackMap stack: java.lang.Throwable
18: aload 2
monitorexit
19: athrow
20: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 21 0 this Lsun/security/provider/NativePRNG$RandomIO;
0 21 1 data [B
3 13 3 len I
4 13 4 ofs I
7 12 5 bufferOfs I
15 16 3 e Ljava/io/IOException;
Exception table:
from to target type
1 13 14 Class java.io.IOException
1 17 18 any
18 19 18 any
MethodParameters:
Name Flags
data
}
SourceFile: "NativePRNG.java"
NestHost: sun.security.provider.NativePRNG
InnerClasses:
private RandomIO = sun.security.provider.NativePRNG$RandomIO of sun.security.provider.NativePRNG
sun.security.provider.NativePRNG$RandomIO$1