object Companion
source · line 187public
public companion
Constants and exact construction factories.
function fromByteArray
source · line 201public
public fun fromByteArray(bytes: List<Byte>, order: ByteOrder = ByteOrder.BigEndian): BigInteger
Copies nonempty signed two's-complement bytes; redundant sign extension is accepted.
parameter bytes
source · line 201public
bytes: List<Byte>
parameter order
source · line 201public
order: ByteOrder = ByteOrder.BigEndian
property TEN
source · line 195public
public val TEN: BigInteger
get: public read-only
The integer ten.
property ZERO
source · line 189public
public val ZERO: BigInteger
get: public read-only
The integer zero.
property TWO
source · line 193public
public val TWO: BigInteger
get: public read-only
The integer two.
function fromMagnitude
source · line 203public
public fun fromMagnitude(signum: Int, bytes: List<Byte>, order: ByteOrder = ByteOrder.BigEndian): BigInteger
Copies magnitude bytes with sign -1, 0, or 1; zero sign requires zero magnitude.
parameter order
source · line 203public
order: ByteOrder = ByteOrder.BigEndian
parameter bytes
source · line 203public
bytes: List<Byte>
parameter signum
source · line 203public
signum: Int
property ONE
source · line 191public
public val ONE: BigInteger
get: public read-only
The integer one.
function parseOrNone
source · line 199public
public fun parseOrNone(text: String, radix: Int = 10): BigInteger?
Returns None only for malformed text; an invalid radix still throws.
parameter radix
source · line 199public
radix: Int = 10
parameter text
source · line 199public
text: String
function parse
source · line 197public
public fun parse(text: String, radix: Int = 10): BigInteger
Parses signed ASCII digits in radix 2..36; malformed text throws NumberFormatException.
parameter radix
source · line 197public
radix: Int = 10
parameter text
source · line 197public
text: String
function probablePrime
source · line 205public
public fun probablePrime(bitLength: Long, random: Random, certainty: Int = 100): BigInteger
Generates a probable prime of exactly bitLength bits, at least two, using the supplied random source.
parameter bitLength
source · line 205public
bitLength: Long
parameter random
source · line 205public
random: Random
parameter certainty
source · line 205public
certainty: Int = 100