public class RandomValueStringGenerator extends Object
| Constructor and Description |
|---|
RandomValueStringGenerator()
Create a generator with the default length (6).
|
RandomValueStringGenerator(int length)
Create a generator of random strings of the length provided
|
| Modifier and Type | Method and Description |
|---|---|
String |
generate() |
protected String |
getAuthorizationCodeString(byte[] verifierBytes)
Convert these random bytes to a verifier string.
|
void |
setLength(int length)
The length of string to generate.
|
void |
setRandom(Random random)
The random value generator used to create token secrets.
|
public RandomValueStringGenerator()
public RandomValueStringGenerator(int length)
length - the length of the strings generatedpublic String generate()
protected String getAuthorizationCodeString(byte[] verifierBytes)
configured. The default implementation mods the bytes to fit into the
ASCII letters 1-9, A-Z, a-z .verifierBytes - The bytes.public void setRandom(Random random)
random - The random value generator used to create token secrets.public void setLength(int length)
length - the length to setCopyright © 2019. All rights reserved.