A secure non blocking random number generator isolated to the current context. The PRNG is bound to the vert.x context and setup to close when the context shuts down.

When applicable, use of VertxContextPRNG rather than create new PRNG objects is helpful to keep the system entropy usage to the minimum avoiding potential blocking across the application.

The use of VertxContextPRNG is particularly appropriate when multiple handlers use random numbers.

no subtypes hierarchy

Initializer
VertxContextPRNG(VertxContextPRNG unknown)
Inherited Attributes
Attributes inherited from: Object
hash, string
Methods
nextIntshared default Integer nextInt()

Returns a secure random int

nextStringshared default String nextString(Integer length)

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.

Parameters:
  • length

    the desired string length before Base64 encoding.

Inherited Methods
Methods inherited from: Object
equals