|
aerogear-crypto 0.1.2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jboss.aerogear.crypto.Random
public class Random
Provides a cryptographically strong RNG
| Field Summary | |
|---|---|
private static String |
ALGORITHM
|
private SecureRandom |
secureRandom
|
| Constructor Summary | |
|---|---|
Random()
Initializes the class with the default algorithm supported |
|
Random(String algorithm)
Initializes the class with the provided RNG algorithm name |
|
| Method Summary | |
|---|---|
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private SecureRandom secureRandom
private static final String ALGORITHM
| Constructor Detail |
|---|
public Random()
public Random(String algorithm)
algorithm - name provided| Method Detail |
|---|
public byte[] randomBytes()
public byte[] randomBytes(int n)
public SecureRandom getSecureRandom()
|
aerogear-crypto 0.1.2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||