Package google.registry.util
Class RandomStringGenerator
java.lang.Object
google.registry.util.StringGenerator
google.registry.util.RandomStringGenerator
- All Implemented Interfaces:
Serializable
Random string generator.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class google.registry.util.StringGenerator
StringGenerator.Alphabets
-
Field Summary
Fields inherited from class google.registry.util.StringGenerator
alphabet, DEFAULT_PASSWORD_LENGTH
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateString
(int length) Generates a random string of a specified length.static RandomStringGenerator
insecureRandomStringGenerator
(String alphabet) Returns an instance of this class backed by an insecurerandom number generator
.Methods inherited from class google.registry.util.StringGenerator
createStrings
-
Constructor Details
-
RandomStringGenerator
-
-
Method Details
-
createString
Generates a random string of a specified length.- Specified by:
createString
in classStringGenerator
-
insecureRandomStringGenerator
Returns an instance of this class backed by an insecurerandom number generator
.This is good for generating non-critical data at high throughput, e.g., log traces.
-