document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. \'\'\' Random BigInteger Generator \'\'\'
  2.     Private Function RandBigInt(ByVal BitLength As BigInteger, ByRef Rnd As Random) As BigInteger
  3.         Dim Rmdr, numParts(BigInteger.DivRem(BitLength, 8, Rmdr)) As Byte
  4.         For i = 0 To numParts.Length - 2 : numParts(i) = Rnd.Next(0, 256) : Next
  5.         numParts(numParts.Length - 1) = If(Rmdr = 0, 0, Rnd.Next(0, 2 ^ Rmdr - 1))
  6.         RandBigInt = New BigInteger(numParts)
  7.     End Function
');