public final class org.bouncycastle.util.BigIntegers
  minor version: 0
  major version: 59
  flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
  this_class: org.bouncycastle.util.BigIntegers
  super_class: java.lang.Object
{
  public static final java.math.BigInteger ZERO;
    descriptor: Ljava/math/BigInteger;
    flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL

  public static final java.math.BigInteger ONE;
    descriptor: Ljava/math/BigInteger;
    flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL

  private static final java.math.BigInteger TWO;
    descriptor: Ljava/math/BigInteger;
    flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL

  private static final java.math.BigInteger THREE;
    descriptor: Ljava/math/BigInteger;
    flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL

  private static final int MAX_ITERATIONS;
    descriptor: I
    flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
    ConstantValue: 1000

  static void <clinit>();
    descriptor: ()V
    flags: (0x0008) ACC_STATIC
    Code:
      stack=2, locals=0, args_size=0
         0: .line 11
            lconst_0
            invokestatic java.math.BigInteger.valueOf:(J)Ljava/math/BigInteger;
            putstatic org.bouncycastle.util.BigIntegers.ZERO:Ljava/math/BigInteger;
         1: .line 12
            lconst_1
            invokestatic java.math.BigInteger.valueOf:(J)Ljava/math/BigInteger;
            putstatic org.bouncycastle.util.BigIntegers.ONE:Ljava/math/BigInteger;
         2: .line 14
            ldc 2
            invokestatic java.math.BigInteger.valueOf:(J)Ljava/math/BigInteger;
            putstatic org.bouncycastle.util.BigIntegers.TWO:Ljava/math/BigInteger;
         3: .line 15
            ldc 3
            invokestatic java.math.BigInteger.valueOf:(J)Ljava/math/BigInteger;
            putstatic org.bouncycastle.util.BigIntegers.THREE:Ljava/math/BigInteger;
         4: .line 17
            return
      LocalVariableTable:
        Start  End  Slot  Name  Signature

  public void <init>();
    descriptor: ()V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=1, locals=1, args_size=1
        start local 0 // org.bouncycastle.util.BigIntegers this
         0: .line 9
            aload 0 /* this */
            invokespecial java.lang.Object.<init>:()V
            return
        end local 0 // org.bouncycastle.util.BigIntegers this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     0  this  Lorg/bouncycastle/util/BigIntegers;

  public static byte[] asUnsignedByteArray(java.math.BigInteger);
    descriptor: (Ljava/math/BigInteger;)[B
    flags: (0x0009) ACC_PUBLIC, ACC_STATIC
    Code:
      stack=5, locals=3, args_size=1
        start local 0 // java.math.BigInteger value
         0: .line 28
            aload 0 /* value */
            invokevirtual java.math.BigInteger.toByteArray:()[B
            astore 1 /* bytes */
        start local 1 // byte[] bytes
         1: .line 30
            aload 1 /* bytes */
            iconst_0
            baload
            ifne 5
         2: .line 32
            aload 1 /* bytes */
            arraylength
            iconst_1
            isub
            newarray 8
            astore 2 /* tmp */
        start local 2 // byte[] tmp
         3: .line 34
            aload 1 /* bytes */
            iconst_1
            aload 2 /* tmp */
            iconst_0
            aload 2 /* tmp */
            arraylength
            invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
         4: .line 36
            aload 2 /* tmp */
            areturn
        end local 2 // byte[] tmp
         5: .line 39
      StackMap locals: byte[]
      StackMap stack:
            aload 1 /* bytes */
            areturn
        end local 1 // byte[] bytes
        end local 0 // java.math.BigInteger value
      LocalVariableTable:
        Start  End  Slot   Name  Signature
            0    6     0  value  Ljava/math/BigInteger;
            1    6     1  bytes  [B
            3    5     2    tmp  [B
    MethodParameters:
       Name  Flags
      value  

  public static byte[] asUnsignedByteArray(int, java.math.BigInteger);
    descriptor: (ILjava/math/BigInteger;)[B
    flags: (0x0009) ACC_PUBLIC, ACC_STATIC
    Code:
      stack=5, locals=6, args_size=2
        start local 0 // int length
        start local 1 // java.math.BigInteger value
         0: .line 50
            aload 1 /* value */
            invokevirtual java.math.BigInteger.toByteArray:()[B
            astore 2 /* bytes */
        start local 2 // byte[] bytes
         1: .line 51
            aload 2 /* bytes */
            arraylength
            iload 0 /* length */
            if_icmpne 3
         2: .line 53
            aload 2 /* bytes */
            areturn
         3: .line 56
      StackMap locals: byte[]
      StackMap stack:
            aload 2 /* bytes */
            iconst_0
            baload
            ifne 4
            iconst_1
            goto 5
      StackMap locals:
      StackMap stack:
         4: iconst_0
      StackMap locals:
      StackMap stack: int
         5: istore 3 /* start */
        start local 3 // int start
         6: .line 57
            aload 2 /* bytes */
            arraylength
            iload 3 /* start */
            isub
            istore 4 /* count */
        start local 4 // int count
         7: .line 59
            iload 4 /* count */
            iload 0 /* length */
            if_icmple 9
         8: .line 61
            new java.lang.IllegalArgumentException
            dup
            ldc "standard length exceeded for value"
            invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
            athrow
         9: .line 64
      StackMap locals: int int
      StackMap stack:
            iload 0 /* length */
            newarray 8
            astore 5 /* tmp */
        start local 5 // byte[] tmp
        10: .line 65
            aload 2 /* bytes */
            iload 3 /* start */
            aload 5 /* tmp */
            aload 5 /* tmp */
            arraylength
            iload 4 /* count */
            isub
            iload 4 /* count */
            invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
        11: .line 66
            aload 5 /* tmp */
            areturn
        end local 5 // byte[] tmp
        end local 4 // int count
        end local 3 // int start
        end local 2 // byte[] bytes
        end local 1 // java.math.BigInteger value
        end local 0 // int length
      LocalVariableTable:
        Start  End  Slot    Name  Signature
            0   12     0  length  I
            0   12     1   value  Ljava/math/BigInteger;
            1   12     2   bytes  [B
            6   12     3   start  I
            7   12     4   count  I
           10   12     5     tmp  [B
    MethodParameters:
        Name  Flags
      length  
      value   

  public static java.math.BigInteger createRandomInRange(java.math.BigInteger, java.math.BigInteger, java.security.SecureRandom);
    descriptor: (Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/security/SecureRandom;)Ljava/math/BigInteger;
    flags: (0x0009) ACC_PUBLIC, ACC_STATIC
    Code:
      stack=3, locals=6, args_size=3
        start local 0 // java.math.BigInteger min
        start local 1 // java.math.BigInteger max
        start local 2 // java.security.SecureRandom random
         0: .line 82
            aload 0 /* min */
            aload 1 /* max */
            invokevirtual java.math.BigInteger.compareTo:(Ljava/math/BigInteger;)I
            istore 3 /* cmp */
        start local 3 // int cmp
         1: .line 83
            iload 3 /* cmp */
            iflt 5
         2: .line 85
            iload 3 /* cmp */
            ifle 4
         3: .line 87
            new java.lang.IllegalArgumentException
            dup
            ldc "'min' may not be greater than 'max'"
            invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
            athrow
         4: .line 90
      StackMap locals: int
      StackMap stack:
            aload 0 /* min */
            areturn
         5: .line 93
      StackMap locals:
      StackMap stack:
            aload 0 /* min */
            invokevirtual java.math.BigInteger.bitLength:()I
            aload 1 /* max */
            invokevirtual java.math.BigInteger.bitLength:()I
            iconst_2
            idiv
            if_icmple 7
         6: .line 95
            getstatic org.bouncycastle.util.BigIntegers.ZERO:Ljava/math/BigInteger;
            aload 1 /* max */
            aload 0 /* min */
            invokevirtual java.math.BigInteger.subtract:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
            aload 2 /* random */
            invokestatic org.bouncycastle.util.BigIntegers.createRandomInRange:(Ljava/math/BigInteger;Ljava/math/BigInteger;Ljava/security/SecureRandom;)Ljava/math/BigInteger;
            aload 0 /* min */
            invokevirtual java.math.BigInteger.add:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
            areturn
         7: .line 98
      StackMap locals:
      StackMap stack:
            iconst_0
            istore 4 /* i */
        start local 4 // int i
         8: goto 13
         9: .line 100
      StackMap locals: int
      StackMap stack:
            aload 1 /* max */
            invokevirtual java.math.BigInteger.bitLength:()I
            aload 2 /* random */
            invokestatic org.bouncycastle.util.BigIntegers.createRandomBigInteger:(ILjava/security/SecureRandom;)Ljava/math/BigInteger;
            astore 5 /* x */
        start local 5 // java.math.BigInteger x
        10: .line 101
            aload 5 /* x */
            aload 0 /* min */
            invokevirtual java.math.BigInteger.compareTo:(Ljava/math/BigInteger;)I
            iflt 12
            aload 5 /* x */
            aload 1 /* max */
            invokevirtual java.math.BigInteger.compareTo:(Ljava/math/BigInteger;)I
            ifgt 12
        11: .line 103
            aload 5 /* x */
            areturn
        end local 5 // java.math.BigInteger x
        12: .line 98
      StackMap locals:
      StackMap stack:
            iinc 4 /* i */ 1
      StackMap locals:
      StackMap stack:
        13: iload 4 /* i */
            sipush 1000
            if_icmplt 9
        end local 4 // int i
        14: .line 108
            aload 1 /* max */
            aload 0 /* min */
            invokevirtual java.math.BigInteger.subtract:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
            invokevirtual java.math.BigInteger.bitLength:()I
            iconst_1
            isub
            aload 2 /* random */
            invokestatic org.bouncycastle.util.BigIntegers.createRandomBigInteger:(ILjava/security/SecureRandom;)Ljava/math/BigInteger;
            aload 0 /* min */
            invokevirtual java.math.BigInteger.add:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
            areturn
        end local 3 // int cmp
        end local 2 // java.security.SecureRandom random
        end local 1 // java.math.BigInteger max
        end local 0 // java.math.BigInteger min
      LocalVariableTable:
        Start  End  Slot    Name  Signature
            0   15     0     min  Ljava/math/BigInteger;
            0   15     1     max  Ljava/math/BigInteger;
            0   15     2  random  Ljava/security/SecureRandom;
            1   15     3     cmp  I
            8   14     4       i  I
           10   12     5       x  Ljava/math/BigInteger;
    MethodParameters:
        Name  Flags
      min     
      max     
      random  

  public static java.math.BigInteger fromUnsignedByteArray(byte[]);
    descriptor: ([B)Ljava/math/BigInteger;
    flags: (0x0009) ACC_PUBLIC, ACC_STATIC
    Code:
      stack=4, locals=1, args_size=1
        start local 0 // byte[] buf
         0: .line 113
            new java.math.BigInteger
            dup
            iconst_1
            aload 0 /* buf */
            invokespecial java.math.BigInteger.<init>:(I[B)V
            areturn
        end local 0 // byte[] buf
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     0   buf  [B
    MethodParameters:
      Name  Flags
      buf   

  public static java.math.BigInteger fromUnsignedByteArray(byte[], int, int);
    descriptor: ([BII)Ljava/math/BigInteger;
    flags: (0x0009) ACC_PUBLIC, ACC_STATIC
    Code:
      stack=5, locals=4, args_size=3
        start local 0 // byte[] buf
        start local 1 // int off
        start local 2 // int length
         0: .line 118
            aload 0 /* buf */
            astore 3 /* mag */
        start local 3 // byte[] mag
         1: .line 119
            iload 1 /* off */
            ifne 2
            iload 2 /* length */
            aload 0 /* buf */
            arraylength
            if_icmpeq 4
         2: .line 121
      StackMap locals: byte[]
      StackMap stack:
            iload 2 /* length */
            newarray 8
            astore 3 /* mag */
         3: .line 122
            aload 0 /* buf */
            iload 1 /* off */
            aload 3 /* mag */
            iconst_0
            iload 2 /* length */
            invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
         4: .line 124
      StackMap locals:
      StackMap stack:
            new java.math.BigInteger
            dup
            iconst_1
            aload 3 /* mag */
            invokespecial java.math.BigInteger.<init>:(I[B)V
            areturn
        end local 3 // byte[] mag
        end local 2 // int length
        end local 1 // int off
        end local 0 // byte[] buf
      LocalVariableTable:
        Start  End  Slot    Name  Signature
            0    5     0     buf  [B
            0    5     1     off  I
            0    5     2  length  I
            1    5     3     mag  [B
    MethodParameters:
        Name  Flags
      buf     
      off     
      length  

  public static int getUnsignedByteLength(java.math.BigInteger);
    descriptor: (Ljava/math/BigInteger;)I
    flags: (0x0009) ACC_PUBLIC, ACC_STATIC
    Code:
      stack=2, locals=1, args_size=1
        start local 0 // java.math.BigInteger n
         0: .line 129
            aload 0 /* n */
            invokevirtual java.math.BigInteger.bitLength:()I
            bipush 7
            iadd
            bipush 8
            idiv
            ireturn
        end local 0 // java.math.BigInteger n
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     0     n  Ljava/math/BigInteger;
    MethodParameters:
      Name  Flags
      n     

  public static java.math.BigInteger createRandomBigInteger(int, java.security.SecureRandom);
    descriptor: (ILjava/security/SecureRandom;)Ljava/math/BigInteger;
    flags: (0x0009) ACC_PUBLIC, ACC_STATIC
    Code:
      stack=5, locals=2, args_size=2
        start local 0 // int bitLength
        start local 1 // java.security.SecureRandom random
         0: .line 141
            new java.math.BigInteger
            dup
            iconst_1
            iload 0 /* bitLength */
            aload 1 /* random */
            invokestatic org.bouncycastle.util.BigIntegers.createRandom:(ILjava/security/SecureRandom;)[B
            invokespecial java.math.BigInteger.<init>:(I[B)V
            areturn
        end local 1 // java.security.SecureRandom random
        end local 0 // int bitLength
      LocalVariableTable:
        Start  End  Slot       Name  Signature
            0    1     0  bitLength  I
            0    1     1     random  Ljava/security/SecureRandom;
    MethodParameters:
           Name  Flags
      bitLength  
      random     

  public static java.math.BigInteger createRandomPrime(int, int, java.security.SecureRandom);
    descriptor: (IILjava/security/SecureRandom;)Ljava/math/BigInteger;
    flags: (0x0009) ACC_PUBLIC, ACC_STATIC
    Code:
      stack=4, locals=7, args_size=3
        start local 0 // int bitLength
        start local 1 // int certainty
        start local 2 // java.security.SecureRandom random
         0: .line 153
            iload 0 /* bitLength */
            iconst_2
            if_icmpge 2
         1: .line 155
            new java.lang.IllegalArgumentException
            dup
            ldc "bitLength < 2"
            invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
            athrow
         2: .line 160
      StackMap locals:
      StackMap stack:
            iload 0 /* bitLength */
            iconst_2
            if_icmpne 6
         3: .line 162
            aload 2 /* random */
            invokevirtual java.security.SecureRandom.nextInt:()I
            ifge 4
            getstatic org.bouncycastle.util.BigIntegers.TWO:Ljava/math/BigInteger;
            goto 5
      StackMap locals:
      StackMap stack:
         4: getstatic org.bouncycastle.util.BigIntegers.THREE:Ljava/math/BigInteger;
      StackMap locals:
      StackMap stack: java.math.BigInteger
         5: areturn
         6: .line 167
      StackMap locals:
      StackMap stack:
            iload 0 /* bitLength */
            aload 2 /* random */
            invokestatic org.bouncycastle.util.BigIntegers.createRandom:(ILjava/security/SecureRandom;)[B
            astore 4 /* base */
        start local 4 // byte[] base
         7: .line 169
            bipush 8
            aload 4 /* base */
            arraylength
            imul
            iload 0 /* bitLength */
            isub
            istore 5 /* xBits */
        start local 5 // int xBits
         8: .line 170
            iconst_1
            bipush 7
            iload 5 /* xBits */
            isub
            ishl
            i2b
            istore 6 /* lead */
        start local 6 // byte lead
         9: .line 173
            aload 4 /* base */
            iconst_0
            dup2
            baload
            iload 6 /* lead */
            ior
            i2b
            bastore
        10: .line 174
            aload 4 /* base */
            aload 4 /* base */
            arraylength
            iconst_1
            isub
            dup2
            baload
            iconst_1
            ior
            i2b
            bastore
        11: .line 176
            new java.math.BigInteger
            dup
            iconst_1
            aload 4 /* base */
            invokespecial java.math.BigInteger.<init>:(I[B)V
            astore 3 /* rv */
        end local 6 // byte lead
        end local 5 // int xBits
        end local 4 // byte[] base
        start local 3 // java.math.BigInteger rv
        12: .line 178
            aload 3 /* rv */
            iload 1 /* certainty */
            invokevirtual java.math.BigInteger.isProbablePrime:(I)Z
            ifeq 6
        13: .line 180
            aload 3 /* rv */
            areturn
        end local 3 // java.math.BigInteger rv
        end local 2 // java.security.SecureRandom random
        end local 1 // int certainty
        end local 0 // int bitLength
      LocalVariableTable:
        Start  End  Slot       Name  Signature
            0   14     0  bitLength  I
            0   14     1  certainty  I
            0   14     2     random  Ljava/security/SecureRandom;
           12   14     3         rv  Ljava/math/BigInteger;
            7   12     4       base  [B
            8   12     5      xBits  I
            9   12     6       lead  B
    MethodParameters:
           Name  Flags
      bitLength  
      certainty  
      random     

  private static byte[] createRandom(int, java.security.SecureRandom);
    descriptor: (ILjava/security/SecureRandom;)[B
    flags: (0x000a) ACC_PRIVATE, ACC_STATIC
    Code:
      stack=5, locals=5, args_size=2
        start local 0 // int bitLength
        start local 1 // java.security.SecureRandom random
         0: .line 186
            iload 0 /* bitLength */
            iconst_1
            if_icmpge 2
         1: .line 188
            new java.lang.IllegalArgumentException
            dup
            ldc "bitLength must be at least 1"
            invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
            athrow
         2: .line 191
      StackMap locals:
      StackMap stack:
            iload 0 /* bitLength */
            bipush 7
            iadd
            bipush 8
            idiv
            istore 2 /* nBytes */
        start local 2 // int nBytes
         3: .line 193
            iload 2 /* nBytes */
            newarray 8
            astore 3 /* rv */
        start local 3 // byte[] rv
         4: .line 195
            aload 1 /* random */
            aload 3 /* rv */
            invokevirtual java.security.SecureRandom.nextBytes:([B)V
         5: .line 198
            bipush 8
            iload 2 /* nBytes */
            imul
            iload 0 /* bitLength */
            isub
            istore 4 /* xBits */
        start local 4 // int xBits
         6: .line 199
            aload 3 /* rv */
            iconst_0
            dup2
            baload
            sipush 255
            iload 4 /* xBits */
            iushr
            i2b
            iand
            i2b
            bastore
         7: .line 201
            aload 3 /* rv */
            areturn
        end local 4 // int xBits
        end local 3 // byte[] rv
        end local 2 // int nBytes
        end local 1 // java.security.SecureRandom random
        end local 0 // int bitLength
      LocalVariableTable:
        Start  End  Slot       Name  Signature
            0    8     0  bitLength  I
            0    8     1     random  Ljava/security/SecureRandom;
            3    8     2     nBytes  I
            4    8     3         rv  [B
            6    8     4      xBits  I
    Exceptions:
      throws java.lang.IllegalArgumentException
    MethodParameters:
           Name  Flags
      bitLength  
      random     
}
SourceFile: "BigIntegers.java"