|
Authentication API v8.1 SP2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Random
java.security.SecureRandom
com.rsa.ace.techservice.util.AceRandom
public class AceRandom
Ace Random Number Generation Class.
This provides a singleton wrapper for the JSAFE_SecureRandom class. It also provides a variety of interfaces that can be used to either place random bytes in an existing array or allocate a random-filled byte array.
| Method Summary | |
|---|---|
byte[] |
getBytes(byte[] buffer)
Random byte generator. |
byte[] |
getBytes(byte[] buffer,
int offset,
int length)
Random byte generator. |
byte[] |
getBytes(int length)
Random byte generator. |
static AceRandom |
getInstance()
Singleton-accessor. |
int |
getInt()
Random integer generator. |
int |
getInt(int minRange,
int maxRange)
Random integer generator. |
int |
nextInt(int maxRange)
Random integer generator. |
| Methods inherited from class java.security.SecureRandom |
|---|
generateSeed, getAlgorithm, getInstance, getInstance, getInstance, getProvider, getSeed, nextBytes, setSeed, setSeed |
| Methods inherited from class java.util.Random |
|---|
nextBoolean, nextDouble, nextFloat, nextGaussian, nextInt, nextLong |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public byte[] getBytes(byte[] buffer,
int offset,
int length)
buffer - A buffer to receive random bytes.offset - The starting offset at which random bytes will be placed.length - The length of the buffer passed.
available.
public byte[] getBytes(byte[] buffer)
buffer - The buffer into which the random bytes will be placed.
public byte[] getBytes(int length)
length - The length of the buffer returned.
public int getInt()
public int getInt(int minRange,
int maxRange)
minRange - The minimum range value. Typically 0 or 1.maxRange - The maximum range value, inclusive.
public int nextInt(int maxRange)
nextInt in class java.util.RandommaxRange - The maximum range value, inclusive.
public static AceRandom getInstance()
throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmException - If the desired random algorithm is not
available.
AuthAgentException
com.rsa.jsafe.JSAFE_InvalidUseException
|
Authentication API v8.1 SP2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||