|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.owasp.esapi.Randomizer
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.
IRandomizer| Constructor Summary | |
Randomizer()
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 Randomizer()
| Method Detail |
public java.lang.String getRandomString(int length,
char[] characterSet)
IRandomizer
getRandomString in interface IRandomizerlength - the lengthcharacterSet - the character set
public boolean getRandomBoolean()
IRandomizer
getRandomBoolean in interface IRandomizer
public int getRandomInteger(int min,
int max)
getRandomInteger in interface IRandomizermin - the minmax - the max
IRandomizer.getRandomInteger(int, int)
public float getRandomReal(float min,
float max)
IRandomizer
getRandomReal in interface IRandomizermin - the minmax - the max
public java.lang.String getRandomFilename(java.lang.String extension)
getRandomFilename in interface IRandomizer
public java.lang.String getRandomGUID()
throws EncryptionException
IRandomizer
getRandomGUID in interface IRandomizerEncryptionException
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 | ||||||||||