object SystemRandom
source · line 11public
public object SystemRandom : Random
- Supertype
Random - Inherited
fun nextBoolean(): Boolean· Random - Inherited
fun nextDouble(): Double· Random - Inherited
fun nextFloat(): Float· Random - Inherited
fun nextInt(until: Int): Int· Random - Inherited
fun nextInt(from: Int, until: Int): Int· Random - Inherited
fun nextInt(): Int· Random - Inherited
fun nextLong(from: Long, until: Long): Long· Random - Inherited
fun nextLong(until: Long): Long· Random - Inherited
fun nextLong(): Long· Random - Inherited
fun nextUInt(): UInt· Random - Inherited
fun nextUInt(until: UInt): UInt· Random - Inherited
fun nextUInt(from: UInt, until: UInt): UInt· Random - Inherited
fun nextULong(until: ULong): ULong· Random - Inherited
fun nextULong(): ULong· Random - Inherited
fun nextULong(from: ULong, until: ULong): ULong· Random
A random source backed by the operating system, independent of deterministic seeded generators.
function nextBytes
source · line 43public
public override fun nextBytes(array: MutableArray<Byte>, fromIndex: Long, toIndex: Long): MutableArray<Byte>
- Overrides
nextBytes
Returns new random bytes or fills the specified mutable-array range, depending on the overload.
parameter toIndex
source · line 46public
toIndex: Long
parameter fromIndex
source · line 45public
fromIndex: Long
parameter array
source · line 44public
array: MutableArray<Byte>
function nextBits
source · line 15public
public override fun nextBits(bitCount: Int): Int
- Overrides
nextBits
Returns the requested number of random bits from the operating-system source.
parameter bitCount
source · line 15public
bitCount: Int
function fill
source · line 72public
public fun fill(buffer: NativeByteBuffer, count: Long = buffer.writableBytes): Long
Appends count operating-system random bytes to the buffer's writable region.
parameter buffer
source · line 72public
buffer: NativeByteBuffer
parameter count
source · line 72public
count: Long = buffer.writableBytes
function nextBytes
source · line 31public
public override fun nextBytes(size: Long): Array<Byte>
- Overrides
nextBytes
Returns new random bytes or fills the specified mutable-array range, depending on the overload.
parameter size
source · line 31public
size: Long