|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.owasp.esapi.reference.DefaultRandomizer
Reference implementation of the IRandomizer interface. This implementation builds on the JCE provider to provide a cryptographically strong source of entropy. The specific algorithm used is configurable in ESAPI.properties.
Randomizer| Constructor Summary | |
DefaultRandomizer()
Hide the constructor for the Singleton pattern. |
|
| Method Summary | |
static boolean |
contains(java.lang.StringBuffer sb,
char c)
Contains. |
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)
FIXME: ENHANCE document whether this is inclusive or not (non-Javadoc) |
float |
getRandomReal(float min,
float max)
Gets the random real. |
java.lang.String |
getRandomString(int length,
char[] characterSet)
Gets the random string. |
static char[] |
union(char[] c1,
char[] c2)
Union two character arrays. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DefaultRandomizer()
| Method Detail |
public java.lang.String getRandomString(int length,
char[] characterSet)
Randomizer
getRandomString in interface Randomizerlength - the lengthcharacterSet - the character set
public boolean getRandomBoolean()
Randomizer
getRandomBoolean in interface Randomizer
public int getRandomInteger(int min,
int max)
getRandomInteger in interface Randomizermin - the minmax - the max
Randomizer.getRandomInteger(int, int)
public float getRandomReal(float min,
float max)
Randomizer
getRandomReal in interface Randomizermin - the minmax - the max
public java.lang.String getRandomFilename(java.lang.String extension)
getRandomFilename in interface Randomizer
public java.lang.String getRandomGUID()
throws EncryptionException
Randomizer
getRandomGUID in interface RandomizerEncryptionException
public static char[] union(char[] c1,
char[] c2)
c1 - the c1c2 - the c2
public static boolean contains(java.lang.StringBuffer sb,
char c)
sb - the sbc - the c
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||