public final class RandomStringFromAlphabetGenerator extends Object
Modifier and Type | Method and Description |
---|---|
static String |
generate(String alphabet,
int length,
Random random)
Generate a random string from an alphabet.
|
@Nonnull public static String generate(String alphabet, int length, Random random)
alphabet
- the characters' alphabet to uselength
- the length of the returned string (greater than 0)random
- Random
(or better SecureRandom
) used for
generating the random string