vertx / io.vertx.ext.auth / VertxContextPRNG / current

# current

`open static fun current(): VertxContextPRNG`

Get or create a secure non blocking random number generator using the current vert.x context. If there is no current context (i.e.: not running on the eventloop) then a java.lang.IllegalStateException is thrown.

### Exceptions

`IllegalStateException` - when there is no context available.

Return
A secure non blocking random number generator.

`open static fun current(context: Context): VertxContextPRNG`

Get or create a secure non blocking random number generator using the provided vert.x context. This method will not throw an exception.

### Parameters

`context` - a Vert.x context.

Return
A secure non blocking random number generator.

`open static fun current(vertx: Vertx): VertxContextPRNG`

Get or create a secure non blocking random number generator using the current vert.x instance. Since the context might be different this method will attempt to use the current context first if available and then fall back to create a new instance of the PRNG.

### Parameters

`vertx` - a Vert.x instance.

Return
A secure non blocking random number generator.