Class RandomStringFromAlphabetGenerator
java.lang.Object
org.schabi.newpipe.extractor.utils.RandomStringFromAlphabetGenerator
Generates a random string from a predefined alphabet.
-
Method Summary
-
Method Details
-
generate
Generate a random string from an alphabet.- Parameters:
alphabet- the characters' alphabet to uselength- the length of the returned string (greater than 0)random-Random(or betterSecureRandom) used for generating the random string- Returns:
- a random string of the requested length made of only characters from the provided alphabet
-