The SecureRandom class provides a cryptographically strong random number generator (RNG).
See the Internet Engineering Task Force (IETF) RFC 1750:
Randomness Recommendations for
Security for more information.
Typical callers of SecureRandom invoke the following methods to retrieve random bytes:
Bytes bytes...
SecureRandom random = new SecureRandom();
Bytes nextBytes = random.nextBytes(bytes);
or more convenient to get a Bytes with the demanded length
int length = 32;
SecureRandom random = new SecureRandom();
Bytes nextBytes = random.nextBytes(length);
dw.crypto.SecureRandom is intentionally an adapter for generating cryptographic hard random numbers.