vertx / io.vertx.ext.auth / PRNG

PRNG

open class PRNG : VertxContextPRNG

Wrapper around secure random that periodically seeds the PRNG with new entropy. To avoid entropy exhaustion the entropy is only refreshed if the PRNG is used. This introduces a new variable which reduces the probability of cracking the random number generator.

Author
Paulo Lopes

Constructors

<init>

PRNG(vertx: Vertx)

Functions

close

open fun close(): Unit

nextBytes

open fun nextBytes(bytes: ByteArray): Unit

nextInt

open fun nextInt(): Int

Inherited Functions

nextString

open fun nextString(length: Int): String

Returns a Base64 mime encoded String of random data with the given length. The length parameter refers to the length of the String before the encoding step.