Package de.fraunhofer.iese.mydata.util
Class RandomStringUtil
java.lang.Object
de.fraunhofer.iese.mydata.util.RandomStringUtil
Generate a random string
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Alphanumeric charactersstatic final String
Alphanumeric characters and special charsstatic final String
Digitsstatic final String
Lower case lettersstatic final String
Special characters that you can also use in URL parameters without codingstatic final String
Upper case letters -
Constructor Summary
ConstructorDescriptionCreate session identifiers.RandomStringUtil
(int length) Create an alphanumeric strings from a secure generator.RandomStringUtil
(int length, String symbols) RandomStringUtil
(int length, Random random) Create an alphanumeric string generator.RandomStringUtil
(int length, Random random, String symbols) -
Method Summary
-
Field Details
-
UPPER
Upper case letters- See Also:
-
LOWER
Lower case letters -
DIGITS
Digits- See Also:
-
SPECIAL
Special characters that you can also use in URL parameters without coding- See Also:
-
ALPHANUM
Alphanumeric characters -
ALPHANUMSPECIAL
Alphanumeric characters and special chars
-
-
Constructor Details
-
RandomStringUtil
- Parameters:
length
- Length of the random string to be generatedrandom
- Random instance to be used to generate the random stringsymbols
- Symbols to be used to generate the random string
-
RandomStringUtil
- Parameters:
length
- Length of the random string to be generatedsymbols
- Symbols to be used to generate the random string
-
RandomStringUtil
Create an alphanumeric string generator.- Parameters:
length
- Length of the random string to be generatedrandom
- Random instance to be used to generate the random string
-
RandomStringUtil
public RandomStringUtil(int length) Create an alphanumeric strings from a secure generator.- Parameters:
length
- Length of the random string to be generated
-
RandomStringUtil
public RandomStringUtil()Create session identifiers.
-
-
Method Details
-
generateString
Generate a random string.- Returns:
- a random string
-