A cryptographically strong random number generator (RNG).
A cryptographically strong random number generator (RNG).
There is a cost of getting a secure random instance for its initial seeding, so it's recommended you use a singleton style so you only create one for all of your usage going forward.
On Linux systems SecureRandom uses /dev/random and it can block waiting for sufficient entropy to build up.
The companion object.