public class Random extends Object
| Modifier and Type | Field and Description |
|---|---|
private static String |
ALGORITHM |
private SecureRandom |
secureRandom |
| Constructor and Description |
|---|
Random()
Initializes the class with the default algorithm supported
|
Random(String algorithm)
Initializes the class with the provided RNG algorithm name
|
| Modifier and Type | Method and Description |
|---|---|
SecureRandom |
getSecureRandom()
Retrieve the reference to the SecureRandom object
|
byte[] |
randomBytes()
Generates a number random bytes which defaults to the buffer of 16
|
byte[] |
randomBytes(int n)
Generates a number random bytes specified by the user
|
private SecureRandom secureRandom
private static final String ALGORITHM
public Random()
public Random(String algorithm)
algorithm - name providedpublic byte[] randomBytes()
public byte[] randomBytes(int n)
public SecureRandom getSecureRandom()
Copyright © 2014 JBoss by Red Hat. All Rights Reserved.