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 MAX_BUFFER_SIZE;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 65536
private static final int MIN_BUFFER_SIZE;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 32
private int bufferSize;
descriptor: I
flags: (0x0002) ACC_PRIVATE
java.io.File seedFile;
descriptor: Ljava/io/File;
flags: (0x0000)
private final java.io.InputStream seedIn;
descriptor: Ljava/io/InputStream;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.io.InputStream nextIn;
descriptor: Ljava/io/InputStream;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private java.io.OutputStream seedOut;
descriptor: Ljava/io/OutputStream;
flags: (0x0002) ACC_PRIVATE
private boolean seedOutInitialized;
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 byte[] nextBuffer;
descriptor: [B
flags: (0x0002) ACC_PRIVATE
private int buffered;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private long lastRead;
descriptor: J
flags: (0x0002) ACC_PRIVATE
private int change_buffer;
descriptor: I
flags: (0x0002) ACC_PRIVATE
private static final int REQ_LIMIT_INC;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 1000
private static final int REQ_LIMIT_DEC;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: -100
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=3, 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
sipush 256
putfield sun.security.provider.NativePRNG$RandomIO.bufferSize:I
2: aload 0
iconst_0
putfield sun.security.provider.NativePRNG$RandomIO.change_buffer:I
3: 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;
4: 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;
5: 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;
6: aload 0
aload 1
putfield sun.security.provider.NativePRNG$RandomIO.seedFile:Ljava/io/File;
7: aload 0
aload 1
invokestatic sun.security.provider.FileInputStreamPool.getInputStream:(Ljava/io/File;)Ljava/io/InputStream;
putfield sun.security.provider.NativePRNG$RandomIO.seedIn:Ljava/io/InputStream;
8: aload 0
aload 2
invokestatic sun.security.provider.FileInputStreamPool.getInputStream:(Ljava/io/File;)Ljava/io/InputStream;
putfield sun.security.provider.NativePRNG$RandomIO.nextIn:Ljava/io/InputStream;
9: aload 0
aload 0
getfield sun.security.provider.NativePRNG$RandomIO.bufferSize:I
newarray 8
putfield sun.security.provider.NativePRNG$RandomIO.nextBuffer:[B
10: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lsun/security/provider/NativePRNG$RandomIO;
0 11 1 seedFile Ljava/io/File;
0 11 2 nextFile Ljava/io/File;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
seedFile
nextFile
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.nextIn: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 "File(s) 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 file(s)"
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.seedIn: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=3, 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.seedOutInitialized:Z
ifne 6
2: aload 0
iconst_1
putfield sun.security.provider.NativePRNG$RandomIO.seedOutInitialized: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.seedOut:Ljava/io/OutputStream;
6: StackMap locals: java.lang.Object
StackMap stack:
aload 0
getfield sun.security.provider.NativePRNG$RandomIO.seedOut:Ljava/io/OutputStream;
ifnull 10
7: aload 0
getfield sun.security.provider.NativePRNG$RandomIO.seedOut:Ljava/io/OutputStream;
aload 1
invokevirtual java.io.OutputStream.write:([B)V
8: goto 10
StackMap locals:
StackMap stack: java.io.IOException
9: pop
10: 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
11: aload 2
monitorexit
12: goto 15
StackMap locals:
StackMap stack: java.lang.Throwable
13: aload 2
monitorexit
14: athrow
15: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 16 0 this Lsun/security/provider/NativePRNG$RandomIO;
0 16 1 seed [B
Exception table:
from to target type
7 8 9 Class java.io.IOException
1 12 13 any
13 14 13 any
MethodParameters:
Name Flags
seed
private void ensureBufferValid();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=4, locals=4, args_size=1
start local 0 0: invokestatic java.lang.System.currentTimeMillis:()J
lstore 1
start local 1 1: iconst_0
istore 3
start local 3 2: aload 0
getfield sun.security.provider.NativePRNG$RandomIO.buffered:I
ifle 7
3: lload 1
aload 0
getfield sun.security.provider.NativePRNG$RandomIO.lastRead:J
lsub
ldc 100
lcmp
ifge 5
4: return
5: StackMap locals: long int
StackMap stack:
aload 0
dup
getfield sun.security.provider.NativePRNG$RandomIO.change_buffer:I
iconst_1
isub
putfield sun.security.provider.NativePRNG$RandomIO.change_buffer:I
6: goto 8
7: StackMap locals:
StackMap stack:
aload 0
dup
getfield sun.security.provider.NativePRNG$RandomIO.change_buffer:I
iconst_1
iadd
putfield sun.security.provider.NativePRNG$RandomIO.change_buffer:I
8: StackMap locals:
StackMap stack:
aload 0
getfield sun.security.provider.NativePRNG$RandomIO.change_buffer:I
sipush 1000
if_icmple 11
9: aload 0
getfield sun.security.provider.NativePRNG$RandomIO.nextBuffer:[B
arraylength
iconst_2
imul
istore 3
10: goto 13
StackMap locals:
StackMap stack:
11: aload 0
getfield sun.security.provider.NativePRNG$RandomIO.change_buffer:I
bipush -100
if_icmpge 13
12: aload 0
getfield sun.security.provider.NativePRNG$RandomIO.nextBuffer:[B
arraylength
iconst_2
idiv
istore 3
13: StackMap locals:
StackMap stack:
iload 3
ifle 27
14: iload 3
ldc 65536
if_icmpgt 22
15: iload 3
bipush 32
if_icmplt 22
16: aload 0
iload 3
newarray 8
putfield sun.security.provider.NativePRNG$RandomIO.nextBuffer:[B
17: getstatic sun.security.provider.NativePRNG.debug:Lsun/security/util/Debug;
ifnull 26
18: getstatic sun.security.provider.NativePRNG.debug:Lsun/security/util/Debug;
new java.lang.StringBuilder
dup
ldc "Buffer size changed to "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
19: iload 3
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
20: invokevirtual sun.security.util.Debug.println:(Ljava/lang/String;)V
21: goto 26
22: StackMap locals:
StackMap stack:
getstatic sun.security.provider.NativePRNG.debug:Lsun/security/util/Debug;
ifnull 26
23: getstatic sun.security.provider.NativePRNG.debug:Lsun/security/util/Debug;
new java.lang.StringBuilder
dup
ldc "Buffer reached limit: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
24: aload 0
getfield sun.security.provider.NativePRNG$RandomIO.nextBuffer:[B
arraylength
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
25: invokevirtual sun.security.util.Debug.println:(Ljava/lang/String;)V
26: StackMap locals:
StackMap stack:
aload 0
iconst_0
putfield sun.security.provider.NativePRNG$RandomIO.change_buffer:I
27: StackMap locals:
StackMap stack:
aload 0
lload 1
putfield sun.security.provider.NativePRNG$RandomIO.lastRead:J
28: aload 0
getfield sun.security.provider.NativePRNG$RandomIO.nextIn:Ljava/io/InputStream;
aload 0
getfield sun.security.provider.NativePRNG$RandomIO.nextBuffer:[B
invokestatic sun.security.provider.NativePRNG$RandomIO.readFully:(Ljava/io/InputStream;[B)V
29: aload 0
aload 0
getfield sun.security.provider.NativePRNG$RandomIO.nextBuffer:[B
arraylength
putfield sun.security.provider.NativePRNG$RandomIO.buffered:I
30: return
end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 31 0 this Lsun/security/provider/NativePRNG$RandomIO;
1 31 1 time J
2 31 3 new_buffer_size I
Exceptions:
throws java.io.IOException
private void implNextBytes(byte[]);
descriptor: ([B)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=5, locals=9, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual sun.security.provider.NativePRNG$RandomIO.getMixRandom:()Lsun/security/provider/SecureRandom;
aload 1
invokevirtual sun.security.provider.SecureRandom.engineNextBytes:([B)V
1: aload 1
arraylength
istore 2
start local 2 2: iconst_0
istore 3
start local 3 3: goto 27
4: StackMap locals: int int
StackMap stack:
aload 0
getfield sun.security.provider.NativePRNG$RandomIO.LOCK_GET_BYTES:Ljava/lang/Object;
dup
astore 8
monitorenter
5: aload 0
invokevirtual sun.security.provider.NativePRNG$RandomIO.ensureBufferValid:()V
6: aload 0
getfield sun.security.provider.NativePRNG$RandomIO.nextBuffer:[B
arraylength
aload 0
getfield sun.security.provider.NativePRNG$RandomIO.buffered:I
isub
istore 5
start local 5 7: iload 2
aload 0
getfield sun.security.provider.NativePRNG$RandomIO.buffered:I
if_icmple 11
8: aload 0
getfield sun.security.provider.NativePRNG$RandomIO.buffered:I
istore 4
start local 4 9: aload 0
iconst_0
putfield sun.security.provider.NativePRNG$RandomIO.buffered:I
10: goto 13
end local 4 11: StackMap locals: sun.security.provider.NativePRNG$RandomIO byte[] int int top int top top java.lang.Object
StackMap stack:
iload 2
istore 4
start local 4 12: aload 0
dup
getfield sun.security.provider.NativePRNG$RandomIO.buffered:I
iload 4
isub
putfield sun.security.provider.NativePRNG$RandomIO.buffered:I
13: StackMap locals: sun.security.provider.NativePRNG$RandomIO byte[] int int int int top top java.lang.Object
StackMap stack:
aload 0
getfield sun.security.provider.NativePRNG$RandomIO.nextBuffer:[B
iload 5
14: iload 5
iload 4
iadd
15: invokestatic java.util.Arrays.copyOfRange:([BII)[B
astore 7
start local 7 16: aload 8
monitorexit
17: goto 20
end local 7 end local 5 end local 4 StackMap locals: sun.security.provider.NativePRNG$RandomIO byte[] int int top top top top java.lang.Object
StackMap stack: java.lang.Throwable
18: aload 8
monitorexit
19: athrow
start local 4 start local 5 start local 7 20: StackMap locals: sun.security.provider.NativePRNG$RandomIO byte[] int int int int top byte[]
StackMap stack:
iconst_0
istore 6
start local 6 21: goto 25
22: StackMap locals: sun.security.provider.NativePRNG$RandomIO byte[] int int int int int byte[]
StackMap stack:
aload 1
iload 3
dup2
baload
aload 7
iload 6
baload
ixor
i2b
bastore
23: iinc 3 1
24: iinc 6 1
25: StackMap locals:
StackMap stack:
iload 4
iload 6
if_icmpgt 22
26: iload 2
iload 4
isub
istore 2
end local 7 end local 6 end local 5 end local 4 27: StackMap locals: sun.security.provider.NativePRNG$RandomIO byte[] int int
StackMap stack:
iload 2
ifgt 4
end local 3 end local 2 28: goto 31
StackMap locals: sun.security.provider.NativePRNG$RandomIO byte[]
StackMap stack: java.io.IOException
29: astore 2
start local 2 30: new java.security.ProviderException
dup
ldc "nextBytes() failed"
aload 2
invokespecial java.security.ProviderException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 2 31: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 32 0 this Lsun/security/provider/NativePRNG$RandomIO;
0 32 1 data [B
2 28 2 data_len I
3 28 3 ofs I
9 11 4 len I
12 18 4 len I
20 27 4 len I
7 18 5 buf_pos I
20 27 5 buf_pos I
21 27 6 localofs I
16 18 7 localBuffer [B
20 27 7 localBuffer [B
30 31 2 e Ljava/io/IOException;
Exception table:
from to target type
5 17 18 any
18 19 18 any
0 28 29 Class java.io.IOException
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