|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
The IRandomizer interface defines a set of methods for creating cryptographically random numbers and strings. Implementers should be sure to use a strong cryptographic implementation, such as the JCE or BouncyCastle. Weak sources of randomness can undermine a wide variety of security mechanisms.
| Method Summary | |
boolean |
getRandomBoolean()
Returns a random boolean. |
java.lang.String |
getRandomFilename(java.lang.String extension)
Returns an unguessable random filename with the specified extension. |
java.lang.String |
getRandomGUID()
Generates a random GUID. |
int |
getRandomInteger(int min,
int max)
Gets the random integer. |
float |
getRandomReal(float min,
float max)
Gets the random real. |
java.lang.String |
getRandomString(int length,
char[] characterSet)
Gets the random string. |
| Method Detail |
public java.lang.String getRandomString(int length,
char[] characterSet)
length - the lengthcharacterSet - the character set
public boolean getRandomBoolean()
public int getRandomInteger(int min,
int max)
min - the minmax - the max
public java.lang.String getRandomFilename(java.lang.String extension)
public float getRandomReal(float min,
float max)
min - the minmax - the max
public java.lang.String getRandomGUID()
throws EncryptionException
EncryptionException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||