code: function bnpFromNumber(a, b) {
      if ("number" == typeof b) {
          // new BigInteger(int,int,RNG)
          if (a < 2) this.fromInt(1);
          else {
              this.fromNumber(a);
              if (!this.testBit(a - 1))	// force MSB set
                  this.bitwiseTo(BigInteger.ONE.shiftLeft(a - 1), op_or, this);
              if (this.isEven()) this.dAddOffset(1, 0); // force odd
              while (!this.isProbablePrime(b)) {
                  this.dAddOffset(2, 0);
                  if (this.bitLength() > a) this.subTo(BigInteger.ONE.shiftLeft(a - 1), this);
              }
          }
      } else {
          // new BigInteger(int,RNG)
          var x = crypt.randomBytes((a >> 3) + 1)
          var t = a & 7;
  
          if (t > 0)
              x[0] &= ((1 << t) - 1);
          else
              x[0] = 0;
  
          this.fromByteArray(x);
      }
  }
docs: (protected) alternate constructor