public class RandomUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
private static String |
ALGORITHM |
private static SecureRandom |
secureRandom |
| Constructor and Description |
|---|
RandomUtils() |
| Modifier and Type | Method and Description |
|---|---|
SecureRandom |
getSecureRandom()
Retrieve the reference to the SecureRandom object
|
static byte[] |
randomBytes()
Generates a number random bytes which defaults to the buffer of 16
|
static byte[] |
randomBytes(int n)
Generates a number random bytes specified by the user
|
static String |
randomBytes(int n,
Encoder encoder)
Generates a number random bytes specified by the user
|
private static SecureRandom secureRandom
private static final String ALGORITHM
public static byte[] randomBytes()
public static byte[] randomBytes(int n)
public static String randomBytes(int n, Encoder encoder)
public SecureRandom getSecureRandom()
Copyright © 2016 JBoss by Red Hat. All Rights Reserved.