|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface SecureRandomService
A generator for random data which is cryptographically secure, based
on the same interface as SecureRandom.
SecureRandom directly will
allow implementations to provide security or performance improvements (such as dynamic
re-seeding) without any changes to client code.
Implementations are required to be thread-safe.
| Method Summary | |
|---|---|
boolean |
nextBoolean()
Returns the next pseudorandom boolean. |
void |
nextBytes(byte[] bytes)
Generates a user-specified number of random bytes. |
double |
nextDouble()
Returns the next pseudorandom double. |
float |
nextFloat()
Returns the next pseudorandom float. |
int |
nextInt()
Returns the next pseudorandom int. |
int |
nextInt(int n)
Returns a pseudorandom, int value between 0 (inclusive) and
the specified value (exclusive). |
long |
nextLong()
Returns the next pseudorandom long. |
| Method Detail |
|---|
void nextBytes(byte[] bytes)
bytes - the array to be filled in with random bytes.SecureRandom.nextBytes(byte[])int nextInt()
int.
int.Random.nextInt()int nextInt(int n)
int value between 0 (inclusive) and
the specified value (exclusive).
n - the bound on the random number to be returned. Must be
positive.
int
value between 0 (inclusive) and n (exclusive).
IllegalArgumentException - if n is not positiveRandom.nextInt(int)long nextLong()
long.
long.Random.nextLong()boolean nextBoolean()
boolean.
boolean.Random.nextBoolean()float nextFloat()
float.
float.Random.nextFloat()double nextDouble()
double.
double.Random.nextDouble()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||